mirror of
https://github.com/getAlby/hub.git
synced 2026-08-13 12:33:39 +02:00
48 lines
1.3 KiB
YAML
48 lines
1.3 KiB
YAML
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/*
|