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