From 7c6ae315e152036079ce9e73b4c80940268b2ae0 Mon Sep 17 00:00:00 2001 From: Kevin Yue Date: Tue, 2 Apr 2024 20:48:25 +0800 Subject: [PATCH] Fix CI --- .github/workflows/build.yaml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) 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-*/*