Skip to content

ci: test every pull request, publish every merged version - #67

Draft
fiddur wants to merge 2 commits into
developfrom
ci-pipeline
Draft

ci: test every pull request, publish every merged version#67
fiddur wants to merge 2 commits into
developfrom
ci-pipeline

Conversation

@fiddur

Copy link
Copy Markdown
Collaborator

Closes#60.

Two workflows:

  • test.yml — pull requests and develop pushes: npm ci, build (typecheck resolves workspace imports through built dists), npm test (typecheck for all six packages, tests included, + every suite).
  • release.yml — develop pushes, serialized by a concurrency group: reads the version, asks npm. Not published → npm ci, build, test, npm publish -w @naturalcycles/diffity --provenance --access public, tag v<version>, GitHub release with generated notes. Already published and the merge touched packages/*/src, packages/skills or skillsfail with instructions to re-bump — the parallel-branch double-bump gap AGENTS.md could until now only warn about. Already published and nothing shipped changed → quiet no-op.

AGENTS.md updated to the enforced rule: bump in every PR touching those paths (a comment-only source change trips the same wire; a patch number costs nothing).

No version bump (nothing under the enforced paths). On this PR's own merge, release.yml will find 0.10.0 unpublished and perform the first publish — that needs the NPM_TOKEN secret (automation token with publish rights on the @naturalcycles scope) configured on the repo; without it the workflow fails visibly and can be re-run after the secret is added.

Verified: YAML parses; the decide-step logic (pathspec globbing, npm view on the unpublished version) exercised locally against this checkout.

🤖 Generated with Claude Code

https://claude.ai/code/session_018PkYQzbsnMihHesafWvXKs

fiddurand others added 2 commits August 28, 2026 19:42
test.yml builds and runs the whole suite on pull requests and develop
pushes. release.yml publishes @naturalcycles/diffity with provenance
when a merge lands a version npm does not have, tags it and cuts a
GitHub release — and fails loudly when the version is already published
but the merge changed shipped code, which is the parallel-branch gap
AGENTS.md could only warn about. The bump rule is now the enforced one:
every PR touching packages/*/src, packages/skills or skills bumps.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018PkYQzbsnMihHesafWvXKs
… job
A quoted 'packages/*/src' pathspec matches nothing — git fnmatches
wildcards against the whole path — so the enforcement wire was inert;
:(glob)packages/** now provably fires on real commits. The guarded set
is everything the artifact is built from, tests excluded, and AGENTS.md
states the same set. Tagging is idempotent and the re-bump error names
the manual recovery for a publish that failed at the tag. test.yml runs
the engines floor and the release version, with read-only permissions;
the concurrency comment says what the group actually gives.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018PkYQzbsnMihHesafWvXKs
Sign up for freeto 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.

CI: test on pull requests, publish on develop

1 participant

@fiddur