|
9 | 9 | permissions: |
10 | 10 | contents: write |
11 | 11 | pull-requests: write |
| 12 | + actions: write |
12 | 13 |
|
13 | 14 | jobs: |
14 | 15 | release-please: |
15 | 16 | name: Release Please |
16 | 17 | runs-on: ubuntu-latest |
| 18 | + outputs: |
| 19 | + release_created: ${{ steps.release.outputs.release_created }} |
| 20 | + tag_name: ${{ steps.release.outputs.tag_name }} |
17 | 21 |
|
18 | 22 | steps: |
19 | 23 | - name: Release Please |
| 24 | + id: release |
20 | 25 | uses: googleapis/release-please-action@v4 |
21 | 26 | with: |
22 | 27 | token: ${{ secrets.GITHUB_TOKEN }} |
23 | 28 | config-file: release-please-config.json |
24 | 29 | manifest-file: .release-please-manifest.json |
| 30 | + |
| 31 | + trigger-release-workflows: |
| 32 | + name: Trigger Release Workflows |
| 33 | + needs: release-please |
| 34 | + if: needs.release-please.outputs.release_created == 'true' |
| 35 | + runs-on: ubuntu-latest |
| 36 | + |
| 37 | + steps: |
| 38 | + - name: Trigger GitHub Release (binaries) |
| 39 | + uses: actions/github-script@v7 |
| 40 | + with: |
| 41 | + script: | |
| 42 | + await github.rest.actions.createWorkflowDispatch({ |
| 43 | + owner: context.repo.owner, |
| 44 | + repo: context.repo.repo, |
| 45 | + workflow_id: 'release.yml', |
| 46 | + ref: 'master', |
| 47 | + inputs: { |
| 48 | + tag_name: '${{ needs.release-please.outputs.tag_name }}' |
| 49 | + } |
| 50 | + }); |
| 51 | +
|
| 52 | + - name: Trigger NuGet Release |
| 53 | + uses: actions/github-script@v7 |
| 54 | + with: |
| 55 | + script: | |
| 56 | + await github.rest.actions.createWorkflowDispatch({ |
| 57 | + owner: context.repo.owner, |
| 58 | + repo: context.repo.repo, |
| 59 | + workflow_id: 'nuget-release.yml', |
| 60 | + ref: 'master', |
| 61 | + inputs: { |
| 62 | + tag_name: '${{ needs.release-please.outputs.tag_name }}' |
| 63 | + } |
| 64 | + }); |
| 65 | +
|
| 66 | + - name: Trigger Docker Release |
| 67 | + uses: actions/github-script@v7 |
| 68 | + with: |
| 69 | + script: | |
| 70 | + await github.rest.actions.createWorkflowDispatch({ |
| 71 | + owner: context.repo.owner, |
| 72 | + repo: context.repo.repo, |
| 73 | + workflow_id: 'docker-release.yml', |
| 74 | + ref: 'master', |
| 75 | + inputs: { |
| 76 | + tag_name: '${{ needs.release-please.outputs.tag_name }}' |
| 77 | + } |
| 78 | + }); |
0 commit comments