Skip to content

Commit 7e1d57b

Browse files
committed
Fix major-version release job
Since the checkout action only has a single detached HEAD commit, the push protection that git has in place (to match local refs) must be overridden. Alternatively, we could do a full checkout but force should override the protections without needing all the history.
1 parent 64cb4f2 commit 7e1d57b

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ jobs:
2424
run: |
2525
tag=${tag#refs/tags/}
2626
major=${tag%%.*}
27-
git push origin HEAD:refs/heads/$major
27+
git push -f origin HEAD:refs/heads/$major

node-version/.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ jobs:
2222
run: |
2323
tag=${tag#refs/tags/}
2424
major=${tag%%.*}
25-
git push origin HEAD:refs/heads/$major
25+
git push -f origin HEAD:refs/heads/$major

setup-nodenv/.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ jobs:
2222
run: |
2323
tag=${tag#refs/tags/}
2424
major=${tag%%.*}
25-
git push origin HEAD:refs/heads/$major
25+
git push -f origin HEAD:refs/heads/$major

0 commit comments

Comments
 (0)