|
1 |
| -name: Release |
| 1 | +name: Release-plz |
| 2 | + |
2 | 3 | on:
|
3 | 4 | push:
|
4 | 5 | branches:
|
5 |
| - - 'master' |
6 |
| -permissions: |
7 |
| - pull-requests: write |
8 |
| - contents: write |
9 |
| - id-token: write |
10 |
| - attestations: write |
| 6 | + - master |
| 7 | + |
11 | 8 | jobs:
|
12 |
| - release-plz: |
13 |
| - name: Release-plz |
| 9 | + release-plz-release: |
| 10 | + name: Release-plz release |
14 | 11 | runs-on: ubuntu-latest
|
| 12 | + if: ${{ github.repository_owner == 'zip-rs' }} |
| 13 | + permissions: |
| 14 | + contents: write |
| 15 | + id-token: write |
15 | 16 | steps:
|
16 | 17 | - name: Checkout repository
|
17 | 18 | uses: actions/checkout@v4
|
18 | 19 | with:
|
19 | 20 | fetch-depth: 0
|
20 | 21 | 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 |
26 | 27 | - name: Run release-plz
|
27 |
| - id: release-plz |
28 |
| - |
| 28 | + uses: release-plz/[email protected] |
| 29 | + with: |
| 30 | + command: release |
29 | 31 | env:
|
30 | 32 | 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 |
33 | 48 | 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