Skip to content

Commit d52af5a

Browse files
committed
Get MSRV from Cargo.toml
1 parent 1416e3e commit d52af5a

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

.github/workflows/build.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,24 @@ env:
1212
CARGO_TERM_COLOR: always
1313

1414
jobs:
15+
prepare:
16+
runs-on: ubuntu-latest
17+
outputs:
18+
msrv: ${{ steps.get-msrv.outputs.msrv }}
19+
steps:
20+
- uses: actions/checkout@v4
21+
- name: Get MSRV
22+
id: get-msrv
23+
run: |
24+
MSRV=$(grep '^rust-version' Cargo.toml | cut -d '"' -f 2)
25+
echo "msrv=$MSRV" >> $GITHUB_OUTPUT
1526
build:
27+
needs: prepare
1628
strategy:
1729
matrix:
1830
versions:
1931
- stable
20-
- '1.79.0' # MSRV
32+
- ${{ needs.prepare.outputs.msrv }}
2133
os:
2234
- ubuntu-24.04
2335
- macos-14

0 commit comments

Comments
 (0)