File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66 - ' v*'
77
88jobs :
9+ version-check :
10+ runs-on : ubuntu-latest
11+ steps :
12+ - name : Checkout code
13+ uses : actions/checkout@v4
14+
15+ - name : Read version from Cargo.toml
16+ id : cargo_version
17+ uses : SebRollen/toml-action@v1.2.0
18+ with :
19+ file : Cargo.toml
20+ field : package.version
21+
22+ - name : Fail if tag does not match Cargo.toml version
23+ run : |
24+ expected="v${{ steps.cargo_version.outputs.value }}"
25+ actual="${{ github.ref_name }}"
26+ [ "$expected" = "$actual" ] || {
27+ echo "Version mismatch: release tag '$actual' does not match cargo.toml version '$expected'."
28+ exit 1
29+ }
30+
931 build-linux :
1032 name : Build Linux Binary
33+ needs : [version-check]
1134 runs-on : ubuntu-latest
1235 steps :
1336 - name : Checkout code
3053
3154 build-macos :
3255 name : Build macOS Binary
56+ needs : [version-check]
3357 runs-on : macos-latest
3458 steps :
3559 - name : Checkout code
5276
5377 build-windows :
5478 name : Build Windows Binary
79+ needs : [version-check]
5580 runs-on : windows-latest
5681 steps :
5782 - name : Checkout code
You can’t perform that action at this time.
0 commit comments