Skip to content

Commit acc1935

Browse files
authored
fix: release-start handle re-run step (#7215)
1 parent ac3e38e commit acc1935

1 file changed

Lines changed: 20 additions & 6 deletions

File tree

.github/workflows/release-start.yml

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ jobs:
3737
- name: Install packages
3838
run: npm ci
3939

40+
# ############################################################
41+
# SETUP RELEASE_VERSION and RELEASE_BRANCH
42+
4043
- name: App version (stable, patch latest stable)
4144
if: github.event.inputs.channel == 'stable' && !github.event.inputs.version
4245
run: npm --workspaces version patch
@@ -59,6 +62,8 @@ jobs:
5962
if: github.event.inputs.channel != 'stable' && !github.event.inputs.version
6063
run: npm --workspaces version --preid "${{ github.event.inputs.channel }}" prerelease
6164

65+
# ############################################################
66+
6267
- name: Get version
6368
shell: bash
6469
run: |
@@ -87,22 +92,31 @@ jobs:
8792
with:
8893
username: ${{ (github.event_name == 'workflow_dispatch' && github.actor) || 'insomnia-infra' }}
8994

90-
- name: (Re-run) App version (stable, no version doing patch)
95+
# ############################################################
96+
# re-run the versioning steps to apply to the new branch
97+
98+
- name: (Re-run) App version (stable, patch latest stable)
9199
if: github.event.inputs.channel == 'stable' && !github.event.inputs.version
92100
run: npm --workspaces version patch
93101

94-
- name: (Re-run) App version (stable)
102+
- name: (Re-run) App version (stable, with a specific version)
95103
if: github.event.inputs.channel == 'stable' && github.event.inputs.version
96104
run: npm --workspaces version "${{ github.event.inputs.version }}"
97105

98-
# required for 8.0.0 beta
99-
- name: (Re-run) App version (initial alpha/beta where we specify a new general version)
100-
if: github.event.inputs.channel != 'stable' && github.event.inputs.version
106+
# handle new "major" beta releases, e.g. 10.0, 11.0, 12.0 ...
107+
- name: (Re-run) App version (alpha/beta, with new general version)
108+
if: github.event.inputs.channel != 'stable' && github.event.inputs.version && !contains(github.event.inputs.version, "-${{ github.event.inputs.channel }}")
101109
run: npm --workspaces version "${{ github.event.inputs.version }}-${{ github.event.inputs.channel }}.0"
102110

103-
- name: (Re-run) App version (alpha/beta)
111+
# handle botched alpha/beta releases, e.g. for iterations that were merged before running release-publish
112+
- name: (Re-run) App version (alpha/beta, with a specific version)
113+
if: github.event.inputs.channel != 'stable' && github.event.inputs.version && contains(github.event.inputs.version, "-${{ github.event.inputs.channel }}")
114+
run: npm --workspaces version "${{ github.event.inputs.version }}"
115+
116+
- name: (Re-run) App version (alpha/beta, patch latest)
104117
if: github.event.inputs.channel != 'stable' && !github.event.inputs.version
105118
run: npm --workspaces version --preid "${{ github.event.inputs.channel }}" prerelease
119+
# ############################################################
106120

107121
- name: Git Commit
108122
run: git commit -am "Bump app version to ${{ env.RELEASE_VERSION }}"

0 commit comments

Comments
 (0)