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/*