Skip to content

Commit

Permalink
actions: fix wrong substring match in release.yml (#200)
Browse files Browse the repository at this point in the history
This appears to expect that the release tag is named `release/vX.Y.Z`
rather than just `vX.Y.Z`, but all the existing release tags use the
second naming format. This is preventing v0.8.0 from being released, as
the publish action fails with
```
Error: Crate version v0.8.0 does not match tag refs/tags/v0.8.0
```
because the refs path was not removed (as it's expected to be
`refs/tags/release/` rather than refs/tags/`).

I'm...not entirely sure how this ever worked previously...
  • Loading branch information
hawkw authored Feb 8, 2023
1 parent 507f578 commit 243c238
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
ref='${{ github.ref }}'
if [[ "$ref" =~ ^refs/tags/v[0-9]+\.[0-9]+\.[0-9]+ ]]; then
echo ::set-output name=publish::true
echo ::set-output name=version::"${ref##refs/tags/release/}"
echo ::set-output name=version::"${ref##refs/tags/}"
else
sha=${{ github.sha }}
echo ::set-output name=version::"test-${sha:0:7}"
Expand Down

0 comments on commit 243c238

Please sign in to comment.