Skip to content

Commit 966faf2

Browse files
authored
Automatic release deployment
1 parent ae1b833 commit 966faf2

1 file changed

Lines changed: 77 additions & 0 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
name: Deploy
2+
3+
on:
4+
release:
5+
types:
6+
- created
7+
8+
jobs:
9+
10+
11+
########################################################################################
12+
checkout:
13+
name: Checkout
14+
strategy:
15+
matrix:
16+
machine: [x64_linux, x64_mac, arm64_linux, arm64_mac]
17+
runs-on: [self-hosted, kmer-db, '${{ matrix.machine }}']
18+
19+
steps:
20+
- uses: actions/checkout@v4
21+
with:
22+
submodules: recursive
23+
24+
########################################################################################
25+
make:
26+
name: Make
27+
needs: checkout
28+
strategy:
29+
fail-fast: false
30+
matrix:
31+
machine: [x64_linux, arm64_linux, x64_mac, arm64_mac]
32+
33+
runs-on: [self-hosted, kmer-db, '${{ matrix.machine }}']
34+
35+
steps:
36+
- name: make
37+
run: |
38+
make clean
39+
make -j32 CXX=g++-12 STATIC_LINK=true
40+
- name: tar artifacts
41+
run: tar -cvzf kmer-db.tar.gz kmer-db LICENSE
42+
43+
44+
########################################################################################
45+
help:
46+
name: Print usage
47+
needs: make
48+
strategy:
49+
fail-fast: false
50+
matrix:
51+
machine: [x64_linux, x64_mac, arm64_linux, arm64_mac]
52+
runs-on: [self-hosted, kmer-db, '${{ matrix.machine }}']
53+
54+
steps:
55+
- name: help
56+
run: ./kmer-db
57+
58+
########################################################################################
59+
upload:
60+
name: Upload
61+
needs: help
62+
strategy:
63+
fail-fast: false
64+
matrix:
65+
machine: [x64_linux, x64_mac, arm64_linux, arm64_mac]
66+
runs-on: [self-hosted, kmer-db, '${{ matrix.machine }}']
67+
68+
steps:
69+
- name: deploy
70+
uses: actions/upload-release-asset@v1.0.1
71+
env:
72+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
73+
with:
74+
upload_url: ${{ github.event.release.upload_url }}
75+
asset_path: ./kmer-db.tar.gz
76+
asset_name: kmer-db-${{ github.event.release.tag_name }}-${{matrix.machine}}.tar.gz
77+
asset_content_type: application/gzip

0 commit comments

Comments
 (0)