Skip to content

Commit 204a480

Browse files
authored
fix version grep for Cargo.toml in release workflow (#138)
1 parent 24ab8e1 commit 204a480

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
continue-on-error: ${{ github.event_name == 'workflow_dispatch' }}
2222
run: |
2323
# Extract the version from the Cargo.toml
24-
VERSION=$(cat "Cargo.toml" | grep '^version' | awk '{ split($0,version,"=") ; gsub(/[\ \"]/, "", version[2]) ; print version[2] }')
24+
VERSION=$(cat "Cargo.toml" | grep '^version =' | awk '{ split($0,version,"=") ; gsub(/[\ \"]/, "", version[2]) ; print version[2] }')
2525
echo version=$VERSION >> "$GITHUB_OUTPUT"
2626
echo "Cargo.toml version: \`$VERSION\`" >> $GITHUB_STEP_SUMMARY
2727
if [ "v${VERSION}" != "${{ github.event.release.tag_name }}" ]; then

0 commit comments

Comments
 (0)