Skip to content

Commit

Permalink
Auto detect msrv.
Browse files Browse the repository at this point in the history
  • Loading branch information
Metaphorme committed Nov 29, 2024
1 parent f98b61f commit 1cdb2b9
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/update_msrv.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Update MSRV

on:
schedule:
- cron: '0 0 * * 0'
workflow_dispatch:

jobs:
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- uses: actions/checkout@v4

- name: Setup Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable

- name: Install cargo-msrv
run: cargo install cargo-msrv --locked

- name: Find msrv
run: echo "MSRV=$(cargo msrv find --output-format minimal)" >> $GITHUB_ENV

- name: Set msrv
run: cargo msrv set $MSRV

- name: Update
run: |
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
git add Cargo.toml
git commit -m "Set MSVC into $(echo $MSVC)"
git push

0 comments on commit 1cdb2b9

Please sign in to comment.