Repository navigation
ci: auto tag - #5
Merged
Merged
Conversation
added 4 commits
August 3, 2026 23:52
No workflow ran on branch pushes or pull requests: cavimg-package.yaml
only triggers on v* tags and workflow_dispatch, so typecheck, tests and
the Go MCP suite were never exercised before a publish.
Add ci.yaml (push/PR on main, plus workflow_call) running cavimg
typecheck/test/build and cavimg-mcp vet/test.
Add dev-check.yaml (push/PR on dev) which reuses ci.yaml and then runs
`npm publish --dry-run` so dev validates the packed tarball and manifest
without contacting the registry or publishing.
Both pin pnpm/action-setup by commit SHA, declare `permissions:
contents: read`, and keep `${{ }}` out of run blocks, matching the
hardening in a4ac388.
Cutting a release needed a hand-pushed tag, so a merged dev -> main PR left main untagged and cavimg-package.yaml with nothing to trigger it. Add release-tag.yaml, triggered on a closed pull request against main and gated on `merged == true` with head.ref == 'dev'. It reuses ci.yaml to typecheck, test and build the merge commit, and only once that passes reads packages/cavimg/package.json and pushes an annotated v<version> tag at the merge commit. If the tag already exists the run is a no-op and the job summary says so, so doc-only merges cut no release and the version bump stays the release trigger. Give ci.yaml an optional workflow_call `ref` input so the reusable call checks out the merge commit rather than the closed PR's merge ref. Publishing stays manual: tags pushed with GITHUB_TOKEN do not trigger other workflows, so cavimg-package.yaml does not fire. The job summary links the operator to the dispatch button.
A fork branch also named dev would otherwise satisfy the head.ref guard. Compare head.repo.full_name against github.repository so only the upstream dev branch can cut a tag.
th3r-dev
force-pushed
the
feature/auto-tag
branch
from
August 3, 2026 16:53
71ec92d to
48d39a0
Compare
`npm publish --dry-run` still queries the registry to check whether the version exists and exits 1 when it does. Once cavimg@1.0.2 went live the dev-check pack job failed on every run with "You cannot publish over the previously published versions: 1.0.2", because dev carries the version that was just released until someone bumps it. Use `npm pack --dry-run`, which is purely local, and follow it with a non-fatal `npm view` probe that reports whether the current version is already on npmjs — turning the old hard failure into the useful signal "bump before merging or no release is cut". Correct the dry_run wording in cavimg-package.yaml, which claimed the flag does not contact the registry. It does, and its dry_run path fails the same way on an already-published version.
|
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.



What change