Skip to content

Commit

Permalink
fix version grep for Cargo.toml in release workflow (#138)
Browse files Browse the repository at this point in the history
  • Loading branch information
mellowagain authored Sep 8, 2023
1 parent 24ab8e1 commit 204a480
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 @@ -21,7 +21,7 @@ jobs:
continue-on-error: ${{ github.event_name == 'workflow_dispatch' }}
run: |
# Extract the version from the Cargo.toml
VERSION=$(cat "Cargo.toml" | grep '^version' | awk '{ split($0,version,"=") ; gsub(/[\ \"]/, "", version[2]) ; print version[2] }')
VERSION=$(cat "Cargo.toml" | grep '^version =' | awk '{ split($0,version,"=") ; gsub(/[\ \"]/, "", version[2]) ; print version[2] }')
echo version=$VERSION >> "$GITHUB_OUTPUT"
echo "Cargo.toml version: \`$VERSION\`" >> $GITHUB_STEP_SUMMARY
if [ "v${VERSION}" != "${{ github.event.release.tag_name }}" ]; then
Expand Down

0 comments on commit 204a480

Please sign in to comment.