| 1 | name: Release-plz |
| 2 | |
| 3 | on: |
| 4 | push: |
| 5 | branches: [main] |
| 6 | workflow_dispatch: |
| 7 | |
| 8 | jobs: |
| 9 | release: |
| 10 | name: Release-plz release |
| 11 | if: ${{ github.repository_owner == 'joshka' }} |
| 12 | runs-on: ubuntu-latest |
| 13 | environment: release |
| 14 | permissions: |
| 15 | contents: write |
| 16 | id-token: write |
| 17 | steps: |
| 18 | - &checkout |
| 19 | name: Checkout repository |
| 20 | uses: actions/checkout@v4 |
| 21 | with: |
| 22 | fetch-depth: 0 |
| 23 | persist-credentials: false |
| 24 | - &install-rust |
| 25 | name: Install Rust toolchain |
| 26 | uses: dtolnay/rust-toolchain@stable |
| 27 | - name: Run release-plz (release) |
| 28 | uses: release-plz/[email protected] |
| 29 | with: |
| 30 | command: release |
| 31 | env: |
| 32 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 33 | |
| 34 | release_pr: |
| 35 | name: Release-plz PR |
| 36 | if: ${{ github.repository_owner == 'joshka' }} |
| 37 | runs-on: ubuntu-latest |
| 38 | permissions: |
| 39 | contents: write |
| 40 | pull-requests: write |
| 41 | concurrency: |
| 42 | group: release-plz-${{ github.ref }} |
| 43 | cancel-in-progress: false |
| 44 | steps: |
| 45 | - *checkout |
| 46 | - *install-rust |
| 47 | - name: Run release-plz (release-pr) |
| 48 | uses: release-plz/[email protected] |
| 49 | with: |
| 50 | command: release-pr |
| 51 | env: |
| 52 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |