Commit 249d9cd
committed
Support workflow_dispatch trigger in release workflow
The release workflow was only designed for workflow_run triggers,
causing errors when manually triggered via workflow_dispatch.
Changes:
1. Handle both trigger types when getting commit SHA:
- workflow_run: use context.payload.workflow_run.head_sha
- workflow_dispatch: use context.sha
2. Updated job conditions to accept both triggers:
- workflow_dispatch (manual trigger)
- workflow_run (automatic trigger after other workflows)
This allows manual testing of the release workflow, which is essential
for fork PRs where workflow_run doesn't trigger due to GitHub's
security restrictions.
Now you can manually trigger the release workflow to test it!1 parent bcdf060 commit 249d9cd
1 file changed
+10
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
32 | 35 | | |
33 | 36 | | |
34 | 37 | | |
35 | 38 | | |
| 39 | + | |
36 | 40 | | |
37 | | - | |
| 41 | + | |
38 | 42 | | |
39 | 43 | | |
40 | 44 | | |
| |||
104 | 108 | | |
105 | 109 | | |
106 | 110 | | |
107 | | - | |
108 | | - | |
| 111 | + | |
| 112 | + | |
109 | 113 | | |
110 | 114 | | |
111 | 115 | | |
| |||
289 | 293 | | |
290 | 294 | | |
291 | 295 | | |
292 | | - | |
293 | | - | |
| 296 | + | |
| 297 | + | |
294 | 298 | | |
295 | 299 | | |
296 | 300 | | |
| |||
0 commit comments