Skip to content

Commit

Permalink
feat: add logic to determine release type for GitHub Actions workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
evertonstz committed Dec 29, 2024
1 parent cae8472 commit 42bc04e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,16 @@ jobs:
GOOS=windows GOARCH=amd64 go build -o bin/go-workflows.exe .
zip -j bin/go-workflows-windows-amd64.zip bin/go-workflows.exe
- name: Determine release type
id: release_type
run: |
TAG_NAME="${{ github.ref_name }}"
if [[ "$TAG_NAME" =~ ^v[0-9]+\.[0-9]+\.1$ ]]; then
echo "is_prerelease=true" >> $GITHUB_ENV
else
echo "is_prerelease=false" >> $GITHUB_ENV
fi
- name: Release
uses: softprops/action-gh-release@v1
with:
Expand All @@ -52,3 +62,4 @@ jobs:
bin/go-workflows-darwin-amd64.tar.gz
bin/go-workflows-darwin-arm64.tar.gz
bin/go-workflows-windows-amd64.zip
prerelease: ${{ env.is_prerelease }}

0 comments on commit 42bc04e

Please sign in to comment.