Skip to content

Commit 741ca45

Browse files
committed
ci: Update release-plz configuration
1 parent 2c77a90 commit 741ca45

File tree

1 file changed

+43
-20
lines changed

1 file changed

+43
-20
lines changed

.github/workflows/release-plz.yml

Lines changed: 43 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,58 @@
1-
name: Release
1+
name: Release-plz
2+
23
on:
34
push:
45
branches:
5-
- 'master'
6-
permissions:
7-
pull-requests: write
8-
contents: write
9-
id-token: write
10-
attestations: write
6+
- master
7+
118
jobs:
12-
release-plz:
13-
name: Release-plz
9+
release-plz-release:
10+
name: Release-plz release
1411
runs-on: ubuntu-latest
12+
if: ${{ github.repository_owner == 'zip-rs' }}
13+
permissions:
14+
contents: write
15+
id-token: write
1516
steps:
1617
- name: Checkout repository
1718
uses: actions/checkout@v4
1819
with:
1920
fetch-depth: 0
2021
token: ${{ secrets.RELEASE_PLZ_PAT }}
21-
- uses: actions-rs/toolchain@v1
22-
with:
23-
toolchain: nightly
24-
override: true
25-
profile: minimal
22+
- name: Install Rust toolchain
23+
uses: dtolnay/rust-toolchain@stable
24+
- name: Authenticate with crates.io
25+
uses: rust-lang/crates-io-auth-action@v1
26+
id: auth
2627
- name: Run release-plz
27-
id: release-plz
28-
uses: MarcoIeni/[email protected]
28+
uses: release-plz/[email protected]
29+
with:
30+
command: release
2931
env:
3032
GITHUB_TOKEN: ${{ secrets.RELEASE_PLZ_PAT }}
31-
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
32-
- uses: actions/attest-build-provenance@v2
33+
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}
34+
35+
release-plz-pr:
36+
name: Release-plz PR
37+
runs-on: ubuntu-latest
38+
if: ${{ github.repository_owner == 'zip-rs' }}
39+
permissions:
40+
pull-requests: write
41+
contents: write
42+
concurrency:
43+
group: release-plz-${{ github.ref }}
44+
cancel-in-progress: false
45+
steps:
46+
- name: Checkout repository
47+
uses: actions/checkout@v4
3348
with:
34-
subject-path: ${{ github.workspace }}/target/release/libzip.rlib
35-
continue-on-error: true
49+
fetch-depth: 0
50+
token: ${{ secrets.RELEASE_PLZ_PAT }}
51+
- name: Install Rust toolchain
52+
uses: dtolnay/rust-toolchain@stable
53+
- name: Run release-plz
54+
uses: release-plz/[email protected]
55+
with:
56+
command: release-pr
57+
env:
58+
GITHUB_TOKEN: ${{ secrets.RELEASE_PLZ_PAT }}

0 commit comments

Comments
 (0)