Skip to content

Commit e958071

Browse files
committed
GHA: Add release job
1 parent 3985744 commit e958071

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

.github/workflows/build.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,38 @@ jobs:
3232
with:
3333
name: ${{ env.REPO }}-${{ matrix.configuration }}
3434
path: component/
35+
36+
release:
37+
runs-on: ubuntu-latest
38+
if: startsWith(github.ref, 'refs/tags/')
39+
needs:
40+
- build
41+
42+
steps:
43+
- name: Set repo and version variable
44+
run: |
45+
echo "REPO=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV
46+
echo "VERSION=${GITHUB_REF##*/}" >> $GITHUB_ENV
47+
48+
- uses: actions/download-artifact@v1
49+
with:
50+
name: ${{ env.REPO }}-Release
51+
path: artifacts/${{ env.REPO }}/
52+
53+
- name: Generate fb2k component package
54+
run: |
55+
mkdir artifacts/release/
56+
cd artifacts/${{ env.REPO }}/
57+
zip ../release/${{ env.REPO }}_$VERSION.fb2k-component *
58+
59+
- name: Generate checksums
60+
run: |
61+
cd artifacts/release/
62+
sha256sum * > SHA256SUMS
63+
64+
- name: Release
65+
uses: softprops/action-gh-release@v1
66+
with:
67+
files: artifacts/release/*
68+
env:
69+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)