Repository navigation
feat(release): publish on merge of the release pr - #290
Merged
Merged
Conversation
The approved release PR is the only manual step: publish.yml runs on every push to main and `cl-release ship` tags, publishes to npm and publishes the GitHub releases of the versions not on npm yet, then posts one Slack summary. - `pnpm release:publish` (cl-release version) opens the release PR with the release notes of each package in its description - new `ship` command, dependencies first, resumable; drafts left by the previous flow are published instead of recreated - remove `drafts` and release.yml; tag/publish stay for manual recovery Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
pviti
requested review from
cl-mvezzelli,
gciotola,
malessani,
marco-commercelayer and
pfferrari
October 13, 2026 16:36
malessani
previously approved these changes
Oct 13, 2026
- the notes of a range ending on the release tag printed the version heading twice (an empty block for the tagged commit): write one block per range - check the pull request title with commitlint (pr-title.yml), merge-style titles included: it becomes the message of the merge commit on main Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
marco-commercelayer
previously approved these changes
Oct 13, 2026
The announce job of publish.yml posts a message for each package that the run published to npm (package, version, link to its release notes), also when a later package fails; a run that resumes doesn't announce again what is already on npm. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
marco-commercelayer
approved these changes
Oct 15, 2026
cl-mvezzelli
approved these changes
Oct 15, 2026
This was referenced Oct 15, 2026
pviti
added a commit
that referenced
this pull request
Oct 15, 2026
## Release only when every check of the commit passed > Stacked on #291 (base `fix/publish-release-tooling`). When #291 is merged and its branch deleted, GitHub moves the base of this PR to `main`. On the push to main, `publish.yml` used 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. - It accepts only `success`, `skipped` or `neutral`. Otherwise it stops the release with an error that names the failed workflows. - The plan, the publication and the Slack messages run only after it. - On a manual run (`workflow_dispatch`, to resume a release) it checks the same commit and ignores earlier failed Publish runs. - Timeout: 60 minutes. ### Verification I tested the wait and filter logic on the merge commit of #290 (7d73576): - Integration, Verify and CodeQL succeeded; - nothing is pending, nothing failed; - the failed Publish run is excluded. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
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 on merge
The approved release PR becomes the only manual step of a release: merging it publishes everything.
New flow
pnpm release:publishbumps the changed packages and opens thechore(release)PR. The release notes of each package are in its description, so the reviewer approves exactly what will be published.A reviewer approves the PR, and it is merged.
publish.ymlruns on the push tomainand callscl-release ship, which does, in dependency order:<dir>-v<version>on the commit that set the version;pnpm publishwith OIDC trusted publishing and provenance;Then a Slack message for each package published to npm: package, version (no dist-tag) and the link to its release notes.
Changes
shipcommand.--planfinds the versions not on npm and the commit that set them.publish.yml. It is triggered bypush: mainandworkflow_dispatch(concurrency: publish).ship.publish.yml.version. The release notes now go into the PR description, cut at 60k characters with a link to the commits.draftscommand,release.yml, and therelease:versionandrelease:tagscripts.tag,resolveandpublishremain for manual recovery.pr-title.ymlchecks the pull request title with commitlint. Merge-style titles fail, because the title becomes the message of the merge commit on main.Merging this PR triggers
publish.ymlon main, which publishes the pending majors from #288: cleanups 4.0.0 (its run failed with E409 on cli-ux), metrics, microstore, orders, provisioning, resources, seeder, tags, token, triggers and webhooks.It reuses the existing tags and drafts. I checked it with
cl-release ship --dry-runon the release commit: 11 packages.Repository setting (needs an admin)
On main the merge commits are titled
Merge pull request #N from <branch>, and the PR title is only in their body. To title them with the PR title:Tests
planShip(grouping by commit, oldest first, dependency order) andreleasePrBody(truncation).pnpm lintandcheck-packagespass.🤖 Generated with Claude Code