Skip to content

Commit 87a48aa

Browse files
committed
Use cargo metadata
Signed-off-by: James Sturtevant <[email protected]>
1 parent 60c9403 commit 87a48aa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- name: Check version matches tag
1919
run: |
2020
TAG_VERSION="${GITHUB_REF_NAME#v}"
21-
CARGO_VERSION=$(grep -m1 '^version =' Cargo.toml | sed 's/.*"\(.*\)".*/\1/')
21+
CARGO_VERSION=$(cargo metadata --format-version=1 --no-deps | jq -r '.packages[] | select(.name == "cargo-hyperlight") | .version')
2222
if [ "$TAG_VERSION" != "$CARGO_VERSION" ]; then
2323
echo "Error: Tag version ($TAG_VERSION) does not match Cargo.toml version ($CARGO_VERSION)"
2424
exit 1

0 commit comments

Comments
 (0)