Commit f0b5082
authored
Fix release-tag workflow to push only annotated tags to main (#87)
* fix release-tag workflow for release tag on main
The release-tag workflow checks out a commit (not a branch), leaving
git in detached HEAD state. `git push origin HEAD` fails because git
cannot resolve the bare `HEAD` symbolic ref to a remote branch name.
Create a temporary local branch before committing and use an explicit
refspec (`tmp/release-vX.Y.Z:refs/heads/main`) so the push is an
unambiguous fast-forward to main.
* fix(release-tag): push only the tag, not the commit to main
Branch protection on main requires PRs, status checks, and code
scanning — direct pushes are rejected. Instead of pushing the
version-bump commit to main, commit it locally and push only the
annotated tag ref. Downstream release jobs check out by tag so
they receive the correct versioned code.
* fix(release-tag): push only the tag, not the commit to main
Branch protection on main requires PRs, status checks, and code
scanning — direct pushes are rejected. Instead of pushing the
version-bump commit to main, commit it locally and push only the
annotated tag ref. Downstream release jobs check out by tag so
they receive the correct versioned code.1 parent ee8eeb7 commit f0b5082
1 file changed
+7
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
146 | | - | |
| 146 | + | |
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
| |||
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
163 | | - | |
164 | 163 | | |
165 | 164 | | |
166 | 165 | | |
167 | | - | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
168 | 171 | | |
169 | | - | |
| 172 | + | |
170 | 173 | | |
171 | 174 | | |
172 | 175 | | |
| |||
0 commit comments