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(
107
107
val majorVersionExpr = expr { " steps.${extractMajorVersion.id} .outputs.$MAJOR_VERSION_OUTPUT_NAME " }
108
108
109
109
run (
110
- name = " Create or update a major version tag " ,
110
+ name = " Create or update a major version branch " ,
111
111
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 "
114
115
""" .trimIndent()
115
116
)
116
117
Original file line number Diff line number Diff line change @@ -67,10 +67,11 @@ jobs:
67
67
GHWKT_GITHUB_CONTEXT_JSON : ' ${{ toJSON(github) }}'
68
68
run : ' GHWKT_RUN_STEP='' release:step-8'' '' .github/workflows/release.main.kts'' '
69
69
- id : ' step-9'
70
- name : ' Create or update a major version tag '
70
+ name : ' Create or update a major version branch '
71
71
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 }}"
74
75
- id : ' step-10'
75
76
name : ' Delete temp branch'
76
77
run : ' git push origin --delete temp-branch-for-release'
You can’t perform that action at this time.
0 commit comments