File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed
Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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'
You can’t perform that action at this time.
0 commit comments