File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change 4343 outputs :
4444 VERSION : ${{ steps.extract_version.outputs.VERSION }}
4545
46+ check-version :
47+ name : check version
48+ runs-on : ubuntu-latest
49+ needs : extract-version
50+ steps :
51+ - uses : actions/checkout@v4
52+ - uses : dtolnay/rust-toolchain@stable
53+ - name : Verify crate version matches tag
54+ # Check that the Cargo version starts with the tag,
55+ # so that Cargo version 1.4.8 can be matched against both v1.4.8 and v1.4.8-rc.1
56+ run : |
57+ tag="${{ needs.extract-version.outputs.VERSION }}"
58+ tag=${tag#v}
59+ cargo_ver=$(cargo metadata --no-deps --format-version 1 | jq -r '.packages[0].version')
60+ [[ "$tag" == "$cargo_ver"* ]] || { echo "Tag $tag doesn’t match the Cargo version $cargo_ver"; exit 1; }
61+
4662 build :
4763 name : build release
4864 runs-on : ${{ matrix.configs.os }}
You can’t perform that action at this time.
0 commit comments