Skip to content

Commit f15cdf6

Browse files
committed
fix: strip pre-release suffix when comparing tags
1 parent 480185a commit f15cdf6

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ jobs:
2222
shell: bash
2323
run: |
2424
tag="${GITHUB_REF_NAME#v}"
25+
tag="${tag%%-*}" # strip prerelease suffix, e.g. 0.1.0-rc.1 -> 0.1.0
2526
crate="$(grep -m1 '^version = ' Cargo.toml | sed -E 's/.*"(.*)".*/\1/')"
2627
echo "tag=$tag crate=$crate"
2728
if [ "$tag" != "$crate" ]; then

0 commit comments

Comments
 (0)