Repository navigation
ci: Fix the publish loop guard and push before publishing - #11
Merged
Merged
Conversation
- Loop guard: skip runs started by openactive[bot] and add a skip-CI marker to the version bump commit. The previous guard checked for hello@openactive.io, but the bot has committed as 207210293+openactive[bot] since May 2025, so every bump commit would start another publish. - Push the version bump before publishing, so a rejected push stops the run before anything reaches npm. - Publish on Node 18.17.1 instead of Node 14 (tests pass locally on 18). - Publish with NPM_TOKEN2, a repo-level token to be added (the org NPM_TOKEN is rejected by npm). - Run one publish at a time, and update actions to current versions. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
1.0.4 is already published on npm, but the version bump commit never reached GitHub because the push after publishing failed. Without this, the next release would try to publish 1.0.4 again and npm would reject it. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
howaskew
marked this pull request as ready for review
October 19, 2026 15:32
hkir-dev
approved these changes
Oct 20, 2026
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.
Summary
Fixes the publish loop guard, makes the publish safe to rerun, moves publishing to Node 18, and brings
package.jsonback in line with npm.Changes
Publish workflow (
publish-to-npm.yaml)if:checked forhello@openactive.io, but the bot has committed as207210293+openactive[bot]since May 2025, so a successful push of the version bump would start another publish. The job now skips runs started byopenactive[bot], and the version bump commit message carries a skip-CI marker, so the guard does not depend on an email address.mainbeforenpm publish. If the push is rejected, the job stops and nothing is published, so npm cannot get ahead of GitHub.npm ciandnpm testpass locally on 18.17.1 (28 passing).permissionsreduced tocontents: read;actions/setup-nodev4.Version
package.jsonandpackage-lock.jsonset to 1.0.4, which has been on npm since April 2023 but whose version bump never reachedmain. Without this, every release would try to publish 1.0.4 again and npm would reject it.Verification
actionlint: no issues.1.0.5with the skip-CI marker, authored byopenactive[bot], changing onlypackage.jsonandpackage-lock.json.When merged
Merging starts a publish: tests, bump to 1.0.5, push, publish. 1.0.5 contains the same code as 1.0.4 plus the CI changes merged since 2023. If the push to
mainis rejected, the run stops before publishing and nothing changes.When squash-merging, check the suggested commit message does not contain a skip-CI marker, or no workflows will run.
Note: the required
test (10.x),test (12.x)andtest (14.x)checks have not run for some time; if Node 10 or 12 no longer installs on current runners, the test matrix will need updating before this can merge.