-
-
Notifications
You must be signed in to change notification settings - Fork 8
55 lines (43 loc) · 1.47 KB
/
update_msrv.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Update MSRV
permissions:
contents: write
on:
workflow_call:
workflow_dispatch:
jobs:
update-msrv:
runs-on: ubuntu-latest
steps:
- name: Fetch Repository
uses: actions/checkout@v4
- run: git pull
- name: Install stable toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
- uses: cargo-bins/cargo-binstall@main
- name: Install cargo-msrv
uses: taiki-e/install-action@v2
with:
tool: cargo-msrv
- name: Get msrv data
id: data-msrv
run: |
current_msrv=$(cargo msrv show --output-format minimal);
echo "current msrv: $current_msrv";
echo "current=$current_msrv" >> "$GITHUB_OUTPUT";
new_msrv=$(cargo msrv find --min $current_msrv --output-format minimal);
echo "new msrv: $new_msrv";
echo "new=$new_msrv" >> "$GITHUB_OUTPUT";
- name: Update cargo msrv
run: cargo msrv set ${{ steps.data-msrv.outputs.new }}
- name: Update readme msrv
uses: jacobtomlinson/gha-find-replace@v3
with:
find: ${{ steps.data-msrv.outputs.current }}
replace: ${{ steps.data-msrv.outputs.new }}
regex: false
include: "README.md"
- run: git pull
- name: Commit and Push
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "Update MSRV from [${{steps.data-msrv.outputs.current}}] to [${{steps.data-msrv.outputs.new}}]"