We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a41745f commit a2cae4fCopy full SHA for a2cae4f
.github/workflows/build.yml
@@ -119,6 +119,19 @@ jobs:
119
steps:
120
- name: Checkout
121
uses: actions/checkout@v3
122
+ - name: Check git tag against Cargo version
123
+ if: startsWith(github.ref, 'refs/tags/')
124
+ shell: bash
125
+ run: |
126
+ set -eou
127
+ version=$(grep '^version' Cargo.toml | awk -F' = ' '{print $2}' | tr -d '"')
128
+ version="v$version"
129
+ tag='${{github.ref}}'
130
+ tag="${tag#refs/tags/}"
131
+ if [ "$tag" != "$version" ]; then
132
+ echo "::error::Git tag doesn't match the Cargo version! ($tag != $version)"
133
+ exit 1
134
+ fi
135
- name: Install dependencies
136
if: matrix.packages != ''
137
run: |
0 commit comments