Skip to content

Commit 4d56298

Browse files
committed
Add readme and msrv to pr updates
1 parent 11fccff commit 4d56298

File tree

1 file changed

+26
-1
lines changed

1 file changed

+26
-1
lines changed

.github/workflows/release-plz.yml

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,33 @@ jobs:
4949
- *install-rust
5050
- name: Run release-plz
5151
uses: release-plz/[email protected]
52+
id: release-plz
5253
with:
5354
command: release-pr
5455
env:
5556
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
56-
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
57+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
58+
- name: Install cargo-msrv and update MSRV in Cargo.toml
59+
timeout-minutes: 10
60+
run: |
61+
cargo install cargo-msrv
62+
cargo msrv find --write-msrv
63+
- name: Install cargo-rdme and update readme
64+
run: |
65+
cargo install cargo-rdme
66+
cargo rdme
67+
- name: Update msrv and/or readme in the release PR
68+
env:
69+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
70+
PR: ${{ steps.release-plz.outputs.pr }}
71+
run: |
72+
set -e
73+
74+
pr_number=${{ fromJSON(steps.release-plz.outputs.pr).number }}
75+
if [[ -n "$pr_number" ]]; then
76+
gh pr checkout $pr_number
77+
# change "echo" with your commands
78+
git add .
79+
git commit -m "ci: Update msrv and/or readme"
80+
git push
81+
fi

0 commit comments

Comments
 (0)