@futurelastic/colab-handbook 1.12.0-rc.13 → 1.12.0-rc.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -27,5 +27,5 @@
27
27
  "engines": {
28
28
  "node": ">=18"
29
29
  },
30
- "version": "1.12.0-rc.13"
30
+ "version": "1.12.0-rc.14"
31
31
  }
@@ -137,8 +137,11 @@ env:
137
137
  jobs:
138
138
  release:
139
139
  name: Cut, finalize, publish
140
- # A red CI run on main is not a candidate; skip rather than refuse.
141
- if: github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success'
140
+ # No job-level `if:` here, on purpose (#435): a red CI run is gated in the first step below,
141
+ # so this run concludes success. A job-level `if:` would skip every job, GitHub would record
142
+ # the whole run as `skipped` at that main sha, and `colab ship` reads any finished run that is
143
+ # neither success nor cancelled as "not green". Re-run CI green on that sha and the skipped
144
+ # Release (auto) row would still sit beside it, refusing every ship until main moves.
142
145
  runs-on: ubuntu-latest # EDIT: self-hosted label if this repo needs one.
143
146
  permissions:
144
147
  contents: write # push the tags (and, with promotion: main-loop, the promotion), publish the GitHub Release
@@ -165,6 +168,23 @@ jobs:
165
168
  # checkout's origin. The token is this job's, scoped by `permissions:` above.
166
169
  persist-credentials: true
167
170
 
171
+ # A red CI run on main is not a candidate. Gated here rather than by a job-level `if:` so
172
+ # this run concludes success, never `skipped` (#435; the comment on the job above).
173
+ - name: Gate on the triggering CI run
174
+ id: gate
175
+ env:
176
+ EVENT: ${{ github.event_name }}
177
+ CONCLUSION: ${{ github.event.workflow_run.conclusion }}
178
+ HEAD_SHA: ${{ github.event.workflow_run.head_sha }}
179
+ run: |
180
+ set -euo pipefail
181
+ if [ "$EVENT" = "workflow_run" ] && [ "$CONCLUSION" != "success" ]; then
182
+ echo "cut=false" >> "$GITHUB_OUTPUT"
183
+ echo "CI concluded \`$CONCLUSION\` at $HEAD_SHA — nothing to cut." | tee -a "$GITHUB_STEP_SUMMARY"
184
+ else
185
+ echo "cut=true" >> "$GITHUB_OUTPUT"
186
+ fi
187
+
168
188
  - name: Fetch the colab CLI
169
189
  run: |
170
190
  set -euo pipefail
@@ -219,7 +239,7 @@ jobs:
219
239
  # right after this run promoted: that head has no CI yet — the dispatched run cuts it.
220
240
  - name: Cut a candidate (colab release cut --auto)
221
241
  id: cut
222
- if: (github.event_name == 'workflow_run' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule') && steps.promote.outputs.promoted != 'true'
242
+ if: steps.gate.outputs.cut == 'true' && (github.event_name == 'workflow_run' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule') && steps.promote.outputs.promoted != 'true'
223
243
  run: |
224
244
  set -uo pipefail
225
245
  OUT="$RUNNER_TEMP/cut.json"