Skip to content

Commit

Permalink
ci: Create a deb package on every push (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
kojix2 authored Oct 26, 2022
1 parent d7089fa commit addcd80
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 44 deletions.
29 changes: 0 additions & 29 deletions .github/workflows/build.yml

This file was deleted.

49 changes: 34 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,39 @@
name: ci

on:
push:
pull_request:
branches: [master]
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
release:
name: Release
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, ubuntu-22.04]
steps:
- name: Download source
uses: actions/checkout@v2
- name: Install Crystal
uses: crystal-lang/install-crystal@v1
- name: Install htslib-dev
run: sudo apt -qy install libhts-dev
- name: Install shards
run: shards install
- name: Make
run: make
- name: Run tests
run: ./test.sh
- uses: actions/checkout@v3
- uses: crystal-lang/install-crystal@v1
- run: sudo apt -qy install libhts-dev checkinstall
- run: shards install
- run: make
- run: bash test.sh
- run: sudo checkinstall --pkgname=bam-filter
--pkgversion=$(echo ${{ github.ref }} | sed -e "s#refs/tags/v##g")
--maintainer=2xijok@gmail.com
--requires=libhts-dev,libc6,libpcre3,libevent-dev,libgc-dev
--nodoc -y
- run: mv bam-filter*.deb bam-filter_${{ matrix.os }}_amd64.deb
- uses: actions/upload-artifact@v3
with:
name: bam-filter_${{ matrix.os }}_amd64.deb
path: bam-filter_${{ matrix.os }}_amd64.deb
- uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
draft: true
files: |
bam-filter_${{ matrix.os }}_amd64.deb

0 comments on commit addcd80

Please sign in to comment.