Skip to content

Commit 864b61d

Browse files
committed
fix(ci): trigger release workflow via workflow_dispatch from release-please
GitHub Actions does not trigger workflows from tags created by GITHUB_TOKEN. Add workflow_dispatch trigger to release.yml and a trigger-release job in release-please.yml that dispatches the release workflow after a release is created.
1 parent 1332a82 commit 864b61d

2 files changed

Lines changed: 17 additions & 0 deletions

File tree

.github/workflows/release-please.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,22 @@ jobs:
2323
config-file: release-please-config.json
2424
manifest-file: .release-please-manifest.json
2525

26+
trigger-release:
27+
needs: release-please
28+
if: needs.release-please.outputs.release_created == 'true'
29+
runs-on: ubuntu-latest
30+
steps:
31+
- name: Trigger Release workflow
32+
uses: actions/github-script@v7
33+
with:
34+
script: |
35+
await github.rest.actions.createWorkflowDispatch({
36+
owner: context.repo.owner,
37+
repo: context.repo.repo,
38+
workflow_id: 'release.yml',
39+
ref: '${{ needs.release-please.outputs.tag_name }}',
40+
});
41+
2642
update-readme:
2743
needs: release-please
2844
if: needs.release-please.outputs.release_created == 'true'

.github/workflows/release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
tags:
66
- 'v*'
7+
workflow_dispatch:
78

89
env:
910
CARGO_TERM_COLOR: always

0 commit comments

Comments
 (0)