Skip to content

ci: publish on version change instead of via release-please - #206

Merged
pathscale merged 1 commit into
masterfrom
ci/publish-on-version-change
Jul 26, 2026
Merged

ci: publish on version change instead of via release-please#206
pathscale merged 1 commit into
masterfrom
ci/publish-on-version-change

Conversation

@pathscale

Copy link
Copy Markdown
Owner

Fixes the failed run: 30199878445.

What actually broke

Not the publish — the publish job never started (0s). release-please failed first:

GitHub Actions is not permitted to create or approve pull requests.

That is the repo setting Actions → General → Workflow permissions → "Allow GitHub Actions to create and approve pull requests", which is off (can_approve_pull_request_reviews: false). Job-level pull-requests: write does not substitute for it — it is a separate toggle.

Nothing was published. npm is still on 1.2.11 from 8 June, and the trusted-publisher config you added was never exercised.

The fix, without widening Actions permissions

Drop the Actions-authored PR entirely. The workflow now compares package.json's version against npm and publishes when it isn't there yet. The bump arrives as an ordinary pull request opened by a person or an agent.

So the merge checkpoint before an irreversible publish is unchanged, and Actions never authors a PR — no repo setting to change, no credential, and arguably tighter than granting Actions PR-authoring rights repo-wide.

Version detection queries the exact version rather than latest, so re-runs are idempotent and backfilling an older version is still recognised as published. Verified against the live registry:

version npm view decision
1.2.11 (current) resolves skip
1.3.0 (next) not found publish

Also

Tags the release after a successful publish. Tags here had drifted badly — newest was v1.1.51 while npm was on 1.2.11, with two different formats in use — so tagging as part of publishing keeps them honest going forward.

Removes release-please-config.json and .release-please-manifest.json, now unused. The gates (package check, publint, attw) are unchanged.

Next

This alone publishes nothing — master is 1.2.11, which is already on npm, so merging it is a no-op. The release itself is a separate version-bump PR to 1.3.0, which I'll open once this lands.

🤖 Generated with Claude Code

release-please could not run: creating the release PR needs the repo
setting "Allow GitHub Actions to create and approve pull requests", which
is off, and job-level pull-requests: write does not substitute for it.
The run failed before the publish job started, so nothing was published.

Rather than widen Actions permissions, drop the Actions-authored PR. The
workflow now compares package.json's version against npm and publishes
when it is not there yet. The bump arrives as an ordinary pull request
opened by a person or an agent, so the merge checkpoint before an
irreversible publish is unchanged, and Actions never authors a PR.

Detection queries the exact version rather than `latest`, so re-runs are
idempotent. Verified against the live registry: 1.2.11 resolves and is
skipped, 1.3.0 does not and would publish.

Also tags the release after a successful publish. Tags here had drifted
badly — the newest was v1.1.51 while npm was on 1.2.11 — and tagging as
part of publishing keeps them honest.

Removes the release-please config and manifest, now unused.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

🚀 Preview deployment is ready!

You can view the preview at: https://pr-ui-preview-206.surge.sh

@pathscale
pathscale merged commit bde6c0e into master Jul 26, 2026
2 checks passed
@pathscale
pathscale deleted the ci/publish-on-version-change branch July 26, 2026 11:48
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