Skip to content

Commit

Permalink
Fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
yuezk committed Apr 2, 2024
1 parent cec0d22 commit 7c6ae31
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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-*/*

0 comments on commit 7c6ae31

Please sign in to comment.