|
| 1 | +name: Release-plz |
| 2 | + |
| 3 | +permissions: |
| 4 | + pull-requests: write |
| 5 | + contents: write |
| 6 | + |
| 7 | +on: |
| 8 | + push: |
| 9 | + branches: |
| 10 | + - main |
| 11 | + |
| 12 | +jobs: |
| 13 | + release-plz-release: |
| 14 | + name: Release-plz release |
| 15 | + runs-on: ubuntu-latest |
| 16 | + steps: |
| 17 | + - name: Generate GitHub token |
| 18 | + uses: actions/create-github-app-token@v1 |
| 19 | + id: generate-token |
| 20 | + with: |
| 21 | + # GitHub App ID secret name |
| 22 | + app-id: ${{ secrets.APP_ID }} |
| 23 | + # GitHub App private key secret name |
| 24 | + private-key: ${{ secrets.APP_PRIVATE_KEY }} |
| 25 | + - name: Checkout repository |
| 26 | + uses: actions/checkout@v4 |
| 27 | + with: |
| 28 | + fetch-depth: 0 |
| 29 | + - name: Install Rust toolchain |
| 30 | + uses: dtolnay/rust-toolchain@stable |
| 31 | + - name: Run release-plz |
| 32 | + uses: release-plz/action@v0.5 |
| 33 | + with: |
| 34 | + command: release |
| 35 | + env: |
| 36 | + GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }} |
| 37 | + CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} |
| 38 | + |
| 39 | + release-plz-pr: |
| 40 | + name: Release-plz PR |
| 41 | + runs-on: ubuntu-latest |
| 42 | + concurrency: |
| 43 | + group: release-plz-${{ github.ref }} |
| 44 | + cancel-in-progress: false |
| 45 | + steps: |
| 46 | + - name: Generate GitHub token |
| 47 | + uses: actions/create-github-app-token@v1 |
| 48 | + id: generate-token |
| 49 | + with: |
| 50 | + # GitHub App ID secret name |
| 51 | + app-id: ${{ secrets.APP_ID }} |
| 52 | + # GitHub App private key secret name |
| 53 | + private-key: ${{ secrets.APP_PRIVATE_KEY }} |
| 54 | + - name: Checkout repository |
| 55 | + uses: actions/checkout@v4 |
| 56 | + with: |
| 57 | + fetch-depth: 0 |
| 58 | + - name: Install Rust toolchain |
| 59 | + uses: dtolnay/rust-toolchain@stable |
| 60 | + - name: Run release-plz |
| 61 | + uses: release-plz/action@v0.5 |
| 62 | + with: |
| 63 | + command: release-pr |
| 64 | + env: |
| 65 | + GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }} |
| 66 | + CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} |
0 commit comments