Commit 5e0d889
authored
fix(ci): unbreak hotfix-release semantic-release run (#1091)
The Checkout step used `ref: github.event.pull_request.head.sha`, which puts
git in detached HEAD. python-semantic-release v10.5.3 then bails with
"Detached HEAD state cannot match any release groups; no release will be made"
because it can't match the current branch against pyproject.toml's
`[tool.semantic_release].branch = "master"` config. The release silently
no-ops, no tag is cut, and the downstream build/addon-publish jobs are
skipped — which is what happened on the merge of #1090: stable was never
advanced past v7.4.0 and v7.4.1 was never built.
The original "avoid the merge commit" intent also caused a second latent bug:
the PR head SHA isn't on master's first-parent history, so the workflow's
later `git push origin HEAD:master` would have been non-fast-forward even
if semantic-release had worked.
Switch the checkout to `pull_request.merge_commit_sha` (the merge result
that's actually on master) and attach to a local `master` branch so
semantic-release matches its branch group. The downstream push then
fast-forwards as intended.
Co-authored-by: kingpanther13 <kingpanther13@users.noreply.github.com>1 parent 690196c commit 5e0d889
1 file changed
Lines changed: 11 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
35 | | - | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
36 | 41 | | |
37 | 42 | | |
38 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
39 | 47 | | |
40 | 48 | | |
41 | 49 | | |
| |||
0 commit comments