Repository navigation
ci(publish): release only when every check of the commit passed - #292
Merged
Merged
Conversation
The publish workflow ran alongside Verify, Integration and CodeQL on the push to main, so a release could reach npm from a commit whose lint, tests on the minimum Node or integration suites were failing. A first job now waits for the other workflow runs of the commit and stops the release unless all of them succeeded. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
pviti
requested review from
cl-mvezzelli,
gciotola,
malessani,
marco-commercelayer and
pfferrari
October 15, 2026 10:13
pviti
added a commit
that referenced
this pull request
Oct 15, 2026
## Fix the publish job after #290 The first run of the new `publish.yml` (merge of #290, [run 38717349030](https://github.com/commercelayer/commercelayer-cli/actions/runs/38717349030)) failed with `Unknown command 'ship'`. It stopped before publishing anything: no tags, nothing on npm, no releases. ### Cause The publish job checks out the commit that set the versions (`cf7fd277`, the release commit of #288) and ran the `cl-release` of that commit, which predates `ship`. ### Fix `cl-release` now comes from the workflow's own commit, checked out in `.release-tooling`, and is used by the manifest check and by `ship`. The packages are still built, tested and published from the release commit. The tooling must match the workflow that calls it anyway: in the future the release commit could also have older or newer tooling. ### Release only when every check passed (#292, merged into this branch) A first job, **Checks of the commit**, waits for every other workflow run of the commit (Verify, Integration, CodeQL, …). The release stops unless all of them succeeded. Before, Publish ran alongside them without waiting: on the merge of #290 it ended at 10:04, Verify at 10:07. ### Verification Locally I reproduced the job: checkout of `cf7fd277` with this branch's tooling nested in `.release-tooling`, then `cl-release manifest` and `cl-release ship --dry-run`. Result: the 11 pending packages. ###⚠️ On merge Merging this PR triggers `publish.yml` on main. Once the checks of the merge commit are green, it publishes the 11 pending majors: cleanups 4.0.0, metrics, microstore, orders, provisioning, resources, seeder, tags, token, triggers and webhooks. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Release only when every check of the commit passed
On the push to main,
publish.ymlused to start alongside Verify, Integration and CodeQL, without waiting for them. The merge of #290 shows it: Publish ended at 10:04, Verify at 10:07. A release could therefore reach npm from a commit whose lint, tests on the minimum Node version or integration suites were failing.Change
A new first job, Checks of the commit, waits for every other workflow run of the commit, Publish excluded.
success,skippedorneutral. Otherwise it stops the release with an error that names the failed workflows.workflow_dispatch, to resume a release) it checks the same commit and ignores earlier failed Publish runs.Verification
I tested the wait and filter logic on the merge commit of #290 (7d73576):
🤖 Generated with Claude Code