diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 57d63f4..17c646a 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -155,9 +155,10 @@ jobs: gpgui-source/*.bin.tar.xz.sha256 gh-release: - if: startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/dev' + if: ${{ github.ref == 'refs/heads/dev' || startsWith(github.ref, 'refs/tags/') }} runs-on: ubuntu-latest needs: + - tarball - build-gp - build-gpgui @@ -172,12 +173,14 @@ jobs: env: GH_TOKEN: ${{ secrets.GH_PAT }} RELEASE_TAG: ${{ github.ref == 'refs/heads/dev' && 'snapshot' || github.ref_name }} + REPO: ${{ github.repository }} + NOTES: ${{ github.ref == 'refs/heads/dev' && '**!!! DO NOT USE THIS RELEASE IN PRODUCTION !!!**' || format('Release {0}', github.ref_name) }} run: | - gh release delete $RELEASE_TAG --yes --cleanup-tag || true - gh release create $RELEASE_TAG \ + gh -R "$REPO" release delete $RELEASE_TAG --yes --cleanup-tag || true + gh -R "$REPO" release create $RELEASE_TAG \ --title "$RELEASE_TAG" \ - --notes "Release $RELEASE_TAG" \ - --target ${{ github.ref}} \ + --notes "$NOTES" \ + --target ${{ github.ref }} \ ${{ github.ref == 'refs/heads/dev' && '--prerelease' || '' }} \ - "gh-release/artifact-source/*" \ - "gh-release/artifact-gpgui-*/*" + gh-release/artifact-source/* \ + gh-release/artifact-gpgui-*/*