Skip to content

ci: skip publish when the version is already on npm - #20

Merged
robgilbreath merged 1 commit into
masterfrom
ci/publish-skip-unbumped
Sep 3, 2026
Merged

robgilbreath merged 1 commit into
masterfrom
ci/publish-skip-unbumped

Conversation

@robgilbreath

Copy link
Copy Markdown

Every merge to master without a package.json bump ended in a red publish-on-version-bump run: npm publish over an existing version is a hard E403 (run 33714086138, after #19). Adds the same "already on npm?" check datto-rmm-api-client and timezest have, gating the publish step on it. @pncit/node-quickbooks is access: restricted, so the lookup authenticates with the read-only NPM_TOKEN; the publish itself is unchanged (OIDC trusted publishing).

Workflow-only change — first PR here to rely on the v2.4.0 verify-version-bump path exemption (no version bump). Part of pncit/.github#26.

npm publish over an existing version is a hard E403, so every merge to
master that didn't bump package.json (Dependabot's, and CI-only PRs now
that verify-version-bump exempts them) ended in a red publish run —
run 33714086138 after #19. Look the version up first, as
datto-rmm-api-client and timezest already do; the package is
access: restricted, so the lookup uses the read-only NPM_TOKEN while
the publish itself stays on OIDC trusted publishing.
@robgilbreath
robgilbreath merged commit ab35596 into master Sep 3, 2026
1 check passed
@robgilbreath
robgilbreath deleted the ci/publish-skip-unbumped branch September 3, 2026 04:28
robgilbreath added a commit that referenced this pull request Sep 3, 2026
… authenticate (#21)

@pncit/node-quickbooks is access: restricted and the repo has no
NPM_TOKEN, so the #20 guard's unauthenticated npm view saw 404 for the
current version, reported it unpublished, and the publish step hit the
same E403 (run 33715159834). Compare package.json to HEAD^ instead —
the rule the private libraries already use — and always attempt on a
manual dispatch.
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