Skip to content

Commit 82e783e

Browse files
authored
Merge pull request #619 from Amanieu/release-plz
Add release-plz for automated releases
2 parents 44fa31d + aea9315 commit 82e783e

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
lines changed

.github/workflows/release-plz.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Release-plz
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
10+
# Release unpublished packages.
11+
release-plz-release:
12+
name: Release-plz release
13+
runs-on: ubuntu-latest
14+
if: ${{ github.repository_owner == 'rust-lang' }}
15+
permissions:
16+
contents: write
17+
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@v4
20+
with:
21+
fetch-depth: 0
22+
- name: Install Rust toolchain
23+
uses: dtolnay/rust-toolchain@stable
24+
- name: Run release-plz
25+
uses: release-plz/action@v0.5
26+
with:
27+
command: release
28+
env:
29+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
31+
32+
# Create a PR with the new versions and changelog, preparing the next release.
33+
release-plz-pr:
34+
name: Release-plz PR
35+
runs-on: ubuntu-latest
36+
if: ${{ github.repository_owner == 'rust-lang' }}
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+
- name: Checkout repository
45+
uses: actions/checkout@v4
46+
with:
47+
fetch-depth: 0
48+
- name: Install Rust toolchain
49+
uses: dtolnay/rust-toolchain@stable
50+
- name: Run release-plz
51+
uses: release-plz/action@v0.5
52+
with:
53+
command: release-pr
54+
env:
55+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
56+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}

0 commit comments

Comments
 (0)