|
37 | 37 | - name: Install packages |
38 | 38 | run: npm ci |
39 | 39 |
|
| 40 | + # ############################################################ |
| 41 | + # SETUP RELEASE_VERSION and RELEASE_BRANCH |
| 42 | + |
40 | 43 | - name: App version (stable, patch latest stable) |
41 | 44 | if: github.event.inputs.channel == 'stable' && !github.event.inputs.version |
42 | 45 | run: npm --workspaces version patch |
|
59 | 62 | if: github.event.inputs.channel != 'stable' && !github.event.inputs.version |
60 | 63 | run: npm --workspaces version --preid "${{ github.event.inputs.channel }}" prerelease |
61 | 64 |
|
| 65 | + # ############################################################ |
| 66 | + |
62 | 67 | - name: Get version |
63 | 68 | shell: bash |
64 | 69 | run: | |
@@ -87,22 +92,31 @@ jobs: |
87 | 92 | with: |
88 | 93 | username: ${{ (github.event_name == 'workflow_dispatch' && github.actor) || 'insomnia-infra' }} |
89 | 94 |
|
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) |
91 | 99 | if: github.event.inputs.channel == 'stable' && !github.event.inputs.version |
92 | 100 | run: npm --workspaces version patch |
93 | 101 |
|
94 | | - - name: (Re-run) App version (stable) |
| 102 | + - name: (Re-run) App version (stable, with a specific version) |
95 | 103 | if: github.event.inputs.channel == 'stable' && github.event.inputs.version |
96 | 104 | run: npm --workspaces version "${{ github.event.inputs.version }}" |
97 | 105 |
|
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 }}") |
101 | 109 | run: npm --workspaces version "${{ github.event.inputs.version }}-${{ github.event.inputs.channel }}.0" |
102 | 110 |
|
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) |
104 | 117 | if: github.event.inputs.channel != 'stable' && !github.event.inputs.version |
105 | 118 | run: npm --workspaces version --preid "${{ github.event.inputs.channel }}" prerelease |
| 119 | + # ############################################################ |
106 | 120 |
|
107 | 121 | - name: Git Commit |
108 | 122 | run: git commit -am "Bump app version to ${{ env.RELEASE_VERSION }}" |
|
0 commit comments