Skip to content

fix(ci): pnpm-build-publish needs --no-git-checks to publish from a branch - #199

Merged
craig-johnston merged 1 commit into
mainfrom
devin/fix-pnpm-build-publish-git-checks
Sep 4, 2026
Merged

fix(ci): pnpm-build-publish needs --no-git-checks to publish from a branch#199
craig-johnston merged 1 commit into
mainfrom
devin/fix-pnpm-build-publish-git-checks

Conversation

@craig-johnston

@craig-johnston craig-johnston commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Summary

Found while investigating why pnpm-build-publish (needed to publish the OPTI-4246 pcrepair prerelease) is disabled_manually with zero recorded runs: it's missing --no-git-checks on pnpm publish.

pnpm publish defaults to requiring the checked-out ref to be the publish branch (master/main), clean, and up-to-date with remote. actions/checkout@v6 with an arbitrary ref input leaves the repo on that ref - typically detached HEAD, and never main when publishing a feature-branch prerelease, which is the entire reason this workflow exists separately from node-release.yml. So any attempt to actually use it for that purpose would fail this check.

The equivalent workflow in millicast-sdk already has --no-git-checks (and a dryrun input) - this brings this repo's copy in line with that.

Changes

  • Add --no-git-checks to the pnpm publish invocation.
  • Add the same optional dryrun input / --dry-run wiring the SDK's version has, so a publish can be validated without touching the registry.

Test plan

  • YAML validated (python3 -c "import yaml; yaml.safe_load(...)").
  • Confirmed node-release.yml's existing workflow_call site doesn't pass dryrun, so it's a no-op there (defaults to 'false').
  • Confirmed dryrun.yml is unrelated (separate per-push CI check, doesn't call this workflow).
  • Once this merges, will dry-run then real-publish @millicast/vue-viewer-plugin@1.8.3-pcrepair.0 from devin/OPTI-4246-relayonly-pcrepair to validate end-to-end.

Devin Review

…ranch

This workflow's publish step was missing --no-git-checks. pnpm publish
defaults to requiring the checked-out ref to be the publish branch
(master/main) and clean/up-to-date with remote. actions/checkout with an
arbitrary `ref` input leaves the repo on that ref (typically detached
HEAD, and never main for a feature-branch prerelease), so any attempt to
publish from a non-main ref - the entire point of this workflow existing
separately from node-release.yml - would fail that check.

Also added the same optional `dryrun` input/--dry-run wiring that the
equivalent millicast-sdk workflow already has, so a publish can be
validated without actually hitting the registry. node-release.yml's
existing workflow_call site doesn't pass dryrun, so this is a no-op there
(dryrun defaults to 'false').

Found while investigating why this workflow (renamed from
npm-build-publish.yml, then manually disabled right after the pnpm
migration) had zero runs recorded and needed for OPTI-4246's SDK/plugin
prerelease rollout.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

Devin Review

fi

pnpm publish --provenance "$@"
pnpm publish --provenance --no-git-checks "$@"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟨 Publishing bypasses integrity checks

Normal releases now use --no-git-checks, disabling clean-tree and branch checks. Unexpected build state can reach npm with trusted provenance.

Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

@craig-johnston
craig-johnston merged commit 5d76fb7 into main Sep 4, 2026
2 checks passed
@craig-johnston
craig-johnston deleted the devin/fix-pnpm-build-publish-git-checks branch September 4, 2026 08:13
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