Skip to content

Commit ed46c11

Browse files
committed
Fix by updating major version branch, not tag
1 parent 3d54a0d commit ed46c11

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

.github/workflows/release.main.kts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,11 @@ workflow(
107107
val majorVersionExpr = expr { "steps.${extractMajorVersion.id}.outputs.$MAJOR_VERSION_OUTPUT_NAME" }
108108

109109
run(
110-
name = "Create or update a major version tag",
110+
name = "Create or update a major version branch",
111111
command = """
112-
git tag "$majorVersionExpr" -f
113-
git push origin "$majorVersionExpr" -f
112+
git branch -D "$majorVersionExpr" || true
113+
git checkout -b "$majorVersionExpr"
114+
git push origin "$majorVersionExpr"
114115
""".trimIndent()
115116
)
116117

.github/workflows/release.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,11 @@ jobs:
6767
GHWKT_GITHUB_CONTEXT_JSON: '${{ toJSON(github) }}'
6868
run: 'GHWKT_RUN_STEP=''release:step-8'' ''.github/workflows/release.main.kts'''
6969
- id: 'step-9'
70-
name: 'Create or update a major version tag'
70+
name: 'Create or update a major version branch'
7171
run: |-
72-
git tag "${{ steps.step-8.outputs.majorVersion }}" -f
73-
git push origin "${{ steps.step-8.outputs.majorVersion }}" -f
72+
git branch -D "${{ steps.step-8.outputs.majorVersion }}" || true
73+
git checkout -b "${{ steps.step-8.outputs.majorVersion }}"
74+
git push origin "${{ steps.step-8.outputs.majorVersion }}"
7475
- id: 'step-10'
7576
name: 'Delete temp branch'
7677
run: 'git push origin --delete temp-branch-for-release'

0 commit comments

Comments
 (0)