Repository navigation
Conversation
added 11 commits
August 3, 2026 23:04
Add .github/workflows/cavimg-package.yaml. Publishes packages/cavimg without an NPM_TOKEN: the job requests an OIDC id-token and npm exchanges it for publish rights against the trusted publisher configured for the package. - Triggers: push of a v* tag (live publish) and workflow_dispatch with a stage|publish mode selector, dist-tag, and pack-only dry run. - Runs in the cavimg-package-env environment, which the npm trusted publisher config requires as an OIDC claim. Deployments to that environment are restricted to the main branch and v* tags. - Guards the tag against packages/cavimg/package.json version. - Pins npm >=11.15.0 (minimum for staged publishing) and asserts it. - Installs with --filter cavimg... so the playwright, angular, and next workspaces are skipped, then typechecks, tests, and builds before publishing with --provenance. Bump cavimg to 1.0.2 so the first run has an unpublished version to target; 1.0.1 is already on the registry.
SonarQube Cloud failed the quality gate on PR #1 with a C security rating: four MAJOR findings, all in the publish workflow. - githubactions:S7637 — pin pnpm/action-setup to the full commit SHA behind the v4 tag. A mutable tag on a third-party action can be repointed at arbitrary code; actions/checkout and actions/setup-node are first-party and exempt from the rule. - githubactions:S8543 — pin the npm CLI to an exact 11.19.0 instead of the ^11.15.0 range, so the version that performs the publish is not resolved at run time. The existing assert step still guards the 11.15.0 staged-publishing minimum. - githubactions:S6505 (x2) — pass --ignore-scripts to both the global npm install and the pnpm workspace install, so no dependency lifecycle script executes in a job that holds an OIDC publish token. Verified on a clean install with --ignore-scripts: typecheck clean, 30/30 tests pass, and the ESM, IIFE, and DTS bundles all build. pnpm already blocked those build scripts by default, so nothing regresses. The publish step keeps its scripts enabled on purpose; prepublishOnly runs tsup there.
…d project overview for codex
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.
`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.
added 3 commits
August 4, 2026 00:02
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.
`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