Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add checking for prereleases in GHA #234

Merged
merged 1 commit into from
Jan 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading