Skip to content

Commit

Permalink
Use better release type checking
Browse files Browse the repository at this point in the history
  • Loading branch information
casey committed Sep 3, 2024
1 parent 62d644d commit 258025f
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,15 @@ jobs:
run: |
rustup target add aarch64-pc-windows-msvc
- name: Release Type
id: release-type
run: |
if [[ ${{ github.ref }} =~ ^refs/tags/v[0-9]+[.][0-9]+[.][0-9]+$ ]]; then
echo value=release >> $GITHUB_OUTPUT
else
echo value=prerelease >> $GITHUB_OUTPUT
fi
- name: Package
id: package
if: startsWith(github.ref, 'refs/tags/')
Expand All @@ -170,6 +179,6 @@ jobs:
with:
draft: false
files: ${{steps.package.outputs.archive}}
prerelease: ${{ ! startsWith(github.ref, 'refs/tags/v') }}
prerelease: ${{ steps.release-type.outputs.value == 'prerelease' }}
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

0 comments on commit 258025f

Please sign in to comment.