|
7 | 7 | release: |
8 | 8 | types: [released, prereleased, edited] |
9 | 9 |
|
| 10 | + pull_request: |
| 11 | + types: [closed] |
| 12 | + branches: |
| 13 | + - 'main' |
| 14 | + |
10 | 15 | # Manual trigger for testing |
11 | 16 | workflow_dispatch: |
12 | 17 | inputs: |
13 | 18 | release_tag: |
14 | | - description: 'Release tag to process (e.g., 2025.10.31)' |
15 | | - required: true |
| 19 | + description: 'Release tag to process (optional)' |
| 20 | + required: false |
16 | 21 |
|
17 | 22 | jobs: |
18 | 23 | update-properties: |
19 | 24 | runs-on: ubuntu-latest |
20 | | - # Skip execution if running in .settings repository |
21 | | - if: ${{ !endsWith(github.repository, '.settings') }} |
| 25 | + # Run only on release OR workflow_dispatch if a tag is provided |
| 26 | + if: | |
| 27 | + !endsWith(github.repository, '.settings') && |
| 28 | + (github.event_name == 'release' || (github.event_name == 'workflow_dispatch' && github.event.inputs.release_tag != '')) |
22 | 29 | env: |
23 | 30 | FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true |
24 | 31 |
|
@@ -300,3 +307,25 @@ jobs: |
300 | 307 | gh pr merge ${{ steps.create_pr.outputs.pull-request-number }} --auto --squash |
301 | 308 | env: |
302 | 309 | GH_TOKEN: ${{ secrets.GH_PAT }} |
| 310 | + |
| 311 | + dispatch: |
| 312 | + runs-on: ubuntu-latest |
| 313 | + needs: [update-properties] |
| 314 | + if: | |
| 315 | + always() && |
| 316 | + !endsWith(github.repository, '.settings') && |
| 317 | + ( |
| 318 | + (needs.update-properties.result == 'success') || |
| 319 | + (needs.update-properties.result == 'skipped' && ( |
| 320 | + (github.event_name == 'workflow_dispatch' && github.event.inputs.release_tag == '') || |
| 321 | + (github.event_name == 'pull_request' && github.event.pull_request.merged == true && !contains(github.event.pull_request.labels.*.name, 'releases-update')) |
| 322 | + )) |
| 323 | + ) |
| 324 | + steps: |
| 325 | + - name: Invoke workflow in another repo (Quickpick Dispatcher) |
| 326 | + uses: peter-evans/repository-dispatch@v4 |
| 327 | + with: |
| 328 | + token: ${{ secrets.GH_PAT }} |
| 329 | + repository: Bearsampp/Bearsampp |
| 330 | + event-type: module_release_created |
| 331 | + client-payload: '{"workflow": "combine_releases.yml"}' |
0 commit comments