create-release.yaml raw
1 name: Create release
2
3 on:
4 workflow_call:
5 secrets:
6 repo-token:
7 required: true
8
9 jobs:
10 release:
11 runs-on: ubuntu-22.04
12 steps:
13 - name: Download server archives
14 uses: actions/download-artifact@v4
15 with:
16 pattern: albyhub-Server-*
17 path: artifacts
18 merge-multiple: true
19
20 - name: Download desktop archives
21 uses: actions/download-artifact@v4
22 with:
23 pattern: albyhub-Desktop-*
24 path: artifacts
25 merge-multiple: true
26
27 - name: Create release without tag
28 if: github.ref_type != 'tag'
29 env:
30 GH_TOKEN: ${{ secrets.repo-token }}
31 tag: ${{ github.sha }}
32 run: |
33 echo "Release without tag not supported"
34 exit 1
35
36 - name: Create release with tag
37 if: github.ref_type == 'tag'
38 env:
39 GH_TOKEN: ${{ secrets.repo-token }}
40 tag: ${{ github.ref_name }}
41 run: |
42 gh release create ${{ env.tag }} \
43 --repo="$GITHUB_REPOSITORY" \
44 --title="${GITHUB_REPOSITORY#*/} ${tag#v}" \
45 --generate-notes \
46 --draft \
47 --verify-tag \
48 ./artifacts/*
49