Skip to content

Commit

Permalink
Add checking for prereleases in GHA (#234)
Browse files Browse the repository at this point in the history
  • Loading branch information
kuskoman authored Jan 19, 2024
1 parent c8d0aae commit 07ad2da
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .github/workflows/go-application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,15 @@ jobs:
echo "Tag ref: ${{ github.ref }}"
- name: Generate release notes
run: ./scripts/create_release_notes.sh
- name: Determine if prerelease
id: prerelease
run: |
# if tag name does not start with v, or when the tag name contains -suffix, then it is a prerelease
if [[ "${{ env.TAG_NAME }}" =~ ^v.*$ ]] && [[ "${{ env.TAG_NAME }}" =~ -.*$ ]]; then
echo "::set-output name=is_prerelease::true"
else
echo "::set-output name=is_prerelease::false"
fi
- name: Create GitHub release
id: create_release
uses: actions/create-release@v1
Expand All @@ -392,7 +401,7 @@ jobs:
release_name: Release ${{ github.ref }}
body_path: "./release_notes.txt"
draft: false
prerelease: false
prerelease: ${{ steps.prerelease.outputs.is_prerelease }}

upload-binaries:
strategy:
Expand Down

0 comments on commit 07ad2da

Please sign in to comment.