|
8 | 8 | permissions: |
9 | 9 | contents: read |
10 | 10 |
|
| 11 | +concurrency: |
| 12 | + group: release-plz-${{ github.ref }} |
| 13 | + cancel-in-progress: false |
| 14 | + |
11 | 15 | jobs: |
12 | 16 | release-plz-release: |
13 | 17 | name: Release-plz release |
14 | 18 | runs-on: ubuntu-latest |
| 19 | + if: ${{ github.repository_owner == 'RAprogramm' }} |
15 | 20 | timeout-minutes: 30 |
16 | | - environment: release |
17 | | - permissions: |
18 | | - contents: write |
19 | | - id-token: write |
20 | 21 | steps: |
21 | | - - uses: actions/checkout@v6 |
| 22 | + - name: Mint GitHub App token |
| 23 | + id: app_token |
| 24 | + uses: actions/create-github-app-token@fee1f7d63c2ff003460e3d139729b119787bc349 # v2 |
| 25 | + with: |
| 26 | + app-id: ${{ secrets.RELEASE_PLZ_APP_ID }} |
| 27 | + private-key: ${{ secrets.RELEASE_PLZ_APP_PRIVATE_KEY }} |
| 28 | + - name: Checkout repository |
| 29 | + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 |
22 | 30 | with: |
23 | 31 | fetch-depth: 0 |
24 | | - persist-credentials: false |
| 32 | + token: ${{ steps.app_token.outputs.token }} |
25 | 33 | - name: Install stable Rust |
26 | | - uses: dtolnay/rust-toolchain@stable |
27 | | - - name: Authenticate to crates.io |
28 | | - id: crates-auth |
29 | | - uses: rust-lang/crates-io-auth-action@v1 |
| 34 | + uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable |
30 | 35 | - name: Run release-plz |
31 | | - uses: release-plz/action@v0.5 |
| 36 | + uses: release-plz/action@064f4d1e36c843611ddf013be726beaa4ad804db # v0.5 |
32 | 37 | with: |
33 | 38 | command: release |
34 | 39 | env: |
35 | | - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
36 | | - CARGO_REGISTRY_TOKEN: ${{ steps.crates-auth.outputs.token }} |
| 40 | + GITHUB_TOKEN: ${{ steps.app_token.outputs.token }} |
| 41 | + CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_IO_TOKEN }} |
37 | 42 |
|
38 | 43 | release-plz-pr: |
39 | 44 | name: Release-plz PR |
40 | 45 | runs-on: ubuntu-latest |
| 46 | + if: ${{ github.repository_owner == 'RAprogramm' }} |
| 47 | + needs: release-plz-release |
41 | 48 | timeout-minutes: 30 |
42 | | - permissions: |
43 | | - contents: read |
44 | | - concurrency: |
45 | | - group: release-plz-${{ github.ref }} |
46 | | - cancel-in-progress: false |
47 | 49 | steps: |
48 | | - - name: Generate GitHub App token |
49 | | - id: app-token |
50 | | - uses: actions/create-github-app-token@v2 |
| 50 | + - name: Mint GitHub App token |
| 51 | + id: app_token |
| 52 | + uses: actions/create-github-app-token@fee1f7d63c2ff003460e3d139729b119787bc349 # v2 |
51 | 53 | with: |
52 | 54 | app-id: ${{ secrets.RELEASE_PLZ_APP_ID }} |
53 | 55 | private-key: ${{ secrets.RELEASE_PLZ_APP_PRIVATE_KEY }} |
54 | | - - uses: actions/checkout@v6 |
| 56 | + - name: Checkout repository |
| 57 | + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 |
55 | 58 | with: |
56 | 59 | fetch-depth: 0 |
57 | | - persist-credentials: false |
| 60 | + token: ${{ steps.app_token.outputs.token }} |
58 | 61 | - name: Install stable Rust |
59 | | - uses: dtolnay/rust-toolchain@stable |
| 62 | + uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable |
60 | 63 | - name: Run release-plz |
61 | | - uses: release-plz/action@v0.5 |
| 64 | + uses: release-plz/action@064f4d1e36c843611ddf013be726beaa4ad804db # v0.5 |
62 | 65 | with: |
63 | 66 | command: release-pr |
64 | 67 | env: |
65 | | - GITHUB_TOKEN: ${{ steps.app-token.outputs.token }} |
| 68 | + GITHUB_TOKEN: ${{ steps.app_token.outputs.token }} |
| 69 | + CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_IO_TOKEN }} |
0 commit comments