Skip to content

Commit a536d0b

Browse files
committed
ci: update release-plz workflow
1 parent 36800b2 commit a536d0b

1 file changed

Lines changed: 14 additions & 13 deletions

File tree

.github/workflows/release-plz.yml

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,43 +9,44 @@ jobs:
99
release-plz-release:
1010
name: Release-plz release
1111
runs-on: ubuntu-latest
12+
if: ${{ github.repository_owner == 'inthehack' }}
1213
permissions:
1314
contents: write
15+
id-token: write
1416
steps:
15-
- name: Checkout repository
16-
uses: actions/checkout@v4
17+
- &checkout
18+
name: Checkout repository
19+
uses: actions/checkout@v6
1720
with:
1821
fetch-depth: 0
19-
- name: Install Rust toolchain
22+
persist-credentials: true
23+
token: ${{ secrets.RELEASE_PLZ_TOKEN }}
24+
- &install-rust
25+
name: Install Rust toolchain
2026
uses: dtolnay/rust-toolchain@stable
2127
- name: Run release-plz
2228
uses: release-plz/action@v0.5
2329
with:
2430
command: release
2531
env:
26-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27-
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
32+
GITHUB_TOKEN: ${{ secrets.RELEASE_PLZ_TOKEN }}
2833

2934
release-plz-pr:
3035
name: Release-plz PR
3136
runs-on: ubuntu-latest
37+
if: ${{ github.repository_owner == 'inthehack' }}
3238
permissions:
3339
pull-requests: write
3440
contents: write
3541
concurrency:
3642
group: release-plz-${{ github.ref }}
3743
cancel-in-progress: false
3844
steps:
39-
- name: Checkout repository
40-
uses: actions/checkout@v4
41-
with:
42-
fetch-depth: 0
43-
- name: Install Rust toolchain
44-
uses: dtolnay/rust-toolchain@stable
45+
- *checkout
46+
- *install-rust
4547
- name: Run release-plz
4648
uses: release-plz/action@v0.5
4749
with:
4850
command: release-pr
4951
env:
50-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
51-
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
52+
GITHUB_TOKEN: ${{ secrets.RELEASE_PLZ_TOKEN }}

0 commit comments

Comments
 (0)