Skip to content

Commit 0e2f1f7

Browse files
author
Dave Horner
committed
feat(ci): add release-plz workflow for automated releases
Add a new GitHub Actions workflow to automate releases using release-plz. This workflow triggers on pushes to main and defines jobs for both direct releases and release pull requests, including steps for checkout, Rust toolchain installation, and executing release-plz commands.
1 parent b901bff commit 0e2f1f7

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed

.github/workflows/release-plz.yml

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

0 commit comments

Comments
 (0)