Skip to content

refactor(publish): fold publish-on-merge into publish.yml (no OIDC change needed)#550

Merged
lex00 merged 2 commits into
mainfrom
feat/publish-on-merge-into-publish-yml
Jul 2, 2026
Merged

refactor(publish): fold publish-on-merge into publish.yml (no OIDC change needed)#550
lex00 merged 2 commits into
mainfrom
feat/publish-on-merge-into-publish-yml

Conversation

@lex00

@lex00 lex00 commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Supersedes the separate `publish-on-merge.yml` (from #547) by folding publish-on-merge into the existing `publish.yml`.

Why

npm trusted publishing binds to the workflow filename. A new file (`publish-on-merge.yml`) would require registering it as a trusted publisher on npm for all ~11 packages. `publish.yml` is already the trusted publisher, so reusing it means zero npm/OIDC changes to enable publish-on-merge.

What

  • `publish.yml` gains a gated `push: branches: [main]` trigger (commented out — un-gate to enable). The `chant-v*` tag release path is unchanged.
  • The heavy `test` job is skipped on the branch (merge) path — merged code already passed PR CI, and each `npm publish` re-runs the package's `prepack` (build + validate), so broken packages can't publish. `test` still gates tag releases and manual dispatch.
  • `publish` runs on test success or skipped, never on test failure. Its per-package skip-if-unchanged means only version-bumped packages publish.
  • Deleted `publish-on-merge.yml`.

Un-gate later

Uncomment the `# branches: [main]` line under `push:`. No npm changes required.

Refs #528.

lex00 added 2 commits July 1, 2026 22:00
…ange)

Supersede the separate publish-on-merge.yml with a gated push:branches:[main]
trigger on publish.yml — the workflow npm already trusts — so enabling
publish-on-merge needs NO npm trusted-publisher/OIDC reconfiguration. The
test gate is skipped on the branch path (merged code already passed PR CI;
npm publish re-runs prepack build+validate), and publish runs on
success-or-skipped. Trigger stays commented until un-gated. Refs #528.
Add the gated push:branches:[main] trigger, skip the heavy test job on the
branch path (npm publish re-runs prepack build+validate), and run publish on
test success-or-skipped. Reuses publish.yml so no npm/OIDC change. Refs #528.
@lex00 lex00 merged commit 90ff233 into main Jul 2, 2026
5 checks passed
@lex00 lex00 deleted the feat/publish-on-merge-into-publish-yml branch July 2, 2026 04:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant