Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 258025f

Browse files
committedSep 3, 2024·
Use better release type checking
1 parent 62d644d commit 258025f

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed
 

‎.github/workflows/build.yaml

+10-1
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,15 @@ jobs:
154154
run: |
155155
rustup target add aarch64-pc-windows-msvc
156156
157+
- name: Release Type
158+
id: release-type
159+
run: |
160+
if [[ ${{ github.ref }} =~ ^refs/tags/v[0-9]+[.][0-9]+[.][0-9]+$ ]]; then
161+
echo value=release >> $GITHUB_OUTPUT
162+
else
163+
echo value=prerelease >> $GITHUB_OUTPUT
164+
fi
165+
157166
- name: Package
158167
id: package
159168
if: startsWith(github.ref, 'refs/tags/')
@@ -170,6 +179,6 @@ jobs:
170179
with:
171180
draft: false
172181
files: ${{steps.package.outputs.archive}}
173-
prerelease: ${{ ! startsWith(github.ref, 'refs/tags/v') }}
182+
prerelease: ${{ steps.release-type.outputs.value == 'prerelease' }}
174183
env:
175184
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

0 commit comments

Comments
 (0)
Please sign in to comment.