File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -112,11 +112,22 @@ jobs:
112112 path : rewatch/target
113113 key : rewatch-build-v3-${{ matrix.rust-target }}-${{ hashFiles('rewatch/src/**', 'rewatch/Cargo.lock') }}
114114
115+ - name : Determine Rust toolchain version
116+ id : rust-version
117+ shell : bash
118+ run : |
119+ version="$(awk -F '"' '/^rust-version[[:space:]]*=/ { print $2; exit }' rewatch/Cargo.toml)"
120+ if [ -z "$version" ]; then
121+ echo "rust-version missing in rewatch/Cargo.toml" >&2
122+ exit 1
123+ fi
124+ echo "version=${version}" >> "$GITHUB_OUTPUT"
125+
115126 - name : Install rust toolchain
116127 if : steps.rewatch-build-cache.outputs.cache-hit != 'true'
117128 uses : dtolnay/rust-toolchain@master
118129 with :
119- toolchain : 1.91.0
130+ toolchain : ${{ steps.rust-version.outputs.version }}
120131 targets : ${{ matrix.rust-target }}
121132 components : clippy, rustfmt
122133
You can’t perform that action at this time.
0 commit comments