Skip to content

Commit a5f3290

Browse files
authored
Merge pull request #34 from rararulab/fix/release-plz-workflow
fix(ci): split release-plz into release-pr and publish workflows
2 parents 1da3ec8 + 8b1b6f9 commit a5f3290

File tree

2 files changed

+29
-1
lines changed

2 files changed

+29
-1
lines changed

.github/workflows/publish.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Publish
2+
3+
on:
4+
pull_request:
5+
types: [closed]
6+
branches: [main]
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
release-plz:
13+
if: >-
14+
github.event.pull_request.merged == true
15+
&& startsWith(github.event.pull_request.title, 'chore: release')
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v4
19+
with:
20+
fetch-depth: 0
21+
- uses: dtolnay/rust-toolchain@stable
22+
- uses: MarcoIeni/release-plz-action@v0.5
23+
with:
24+
command: release
25+
env:
26+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}

.github/workflows/release-pr.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ jobs:
1717
fetch-depth: 0
1818
- uses: dtolnay/rust-toolchain@stable
1919
- uses: MarcoIeni/release-plz-action@v0.5
20+
with:
21+
command: release-pr
2022
env:
2123
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
22-
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}

0 commit comments

Comments
 (0)