Skip to content

Commit d03ab66

Browse files
committed
package: Set up release-plz action in dry run mode
1 parent 96f303c commit d03ab66

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+
- main
7+
8+
jobs:
9+
# Release unpublished packages.
10+
release-plz-release:
11+
name: Release-plz release
12+
runs-on: ubuntu-latest
13+
if: ${{ github.repository_owner == 'sourcefrog' }}
14+
permissions:
15+
contents: write
16+
steps:
17+
- &checkout
18+
name: Checkout repository
19+
uses: actions/checkout@v6
20+
with:
21+
fetch-depth: 0
22+
persist-credentials: false
23+
- &install-rust
24+
name: Install Rust toolchain
25+
uses: dtolnay/rust-toolchain@stable
26+
- name: Run release-plz
27+
uses: release-plz/action@v0.5
28+
with:
29+
command: release
30+
dry_run: true
31+
env:
32+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33+
# CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
34+
35+
# Create a PR with the new versions and changelog, preparing the next release.
36+
release-plz-pr:
37+
name: Release-plz PR
38+
runs-on: ubuntu-latest
39+
if: ${{ github.repository_owner == 'sourcefrog' }}
40+
permissions:
41+
contents: write
42+
pull-requests: write
43+
concurrency:
44+
group: release-plz-${{ github.ref }}
45+
cancel-in-progress: false
46+
steps:
47+
- *checkout
48+
- *install-rust
49+
- name: Run release-plz
50+
uses: release-plz/action@v0.5
51+
with:
52+
command: release-pr
53+
dry_run: true
54+
env:
55+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
56+
# CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}

0 commit comments

Comments
 (0)