Skip to content

Commit 31f862e

Browse files
authored
Merge pull request #1 from typester/release-plz
add release-plz workflow
2 parents 7e9ae41 + d6d97ae commit 31f862e

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed

.github/workflows/release.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: release-plz
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
# Release unpublished packages.
10+
release-plz-release:
11+
name: Release-plz release
12+
runs-on: ubuntu-latest
13+
permissions:
14+
contents: write
15+
steps:
16+
- &checkout
17+
name: Checkout repository
18+
uses: actions/checkout@v5
19+
with:
20+
fetch-depth: 0
21+
persist-credentials: false
22+
- &install-rust
23+
name: Install Rust toolchain
24+
uses: dtolnay/rust-toolchain@stable
25+
- name: Run release-plz
26+
uses: release-plz/[email protected]
27+
with:
28+
command: release
29+
env:
30+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
32+
33+
# Create a PR with the new versions and changelog, preparing the next release.
34+
release-plz-pr:
35+
name: Release-plz PR
36+
runs-on: ubuntu-latest
37+
permissions:
38+
contents: write
39+
pull-requests: write
40+
concurrency:
41+
group: release-plz-${{ github.ref }}
42+
cancel-in-progress: false
43+
steps:
44+
- *checkout
45+
- *install-rust
46+
- name: Run release-plz
47+
uses: release-plz/[email protected]
48+
with:
49+
command: release-pr
50+
env:
51+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
52+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}

0 commit comments

Comments
 (0)