fix(ci): pnpm-build-publish needs --no-git-checks to publish from a branch - #199
Merged
Merged
Conversation
…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.
| fi | ||
|
|
||
| pnpm publish --provenance "$@" | ||
| pnpm publish --provenance --no-git-checks "$@" |
Contributor
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
Found while investigating why
pnpm-build-publish(needed to publish the OPTI-4246pcrepairprerelease) isdisabled_manuallywith zero recorded runs: it's missing--no-git-checksonpnpm publish.pnpm publishdefaults to requiring the checked-out ref to be the publish branch (master/main), clean, and up-to-date with remote.actions/checkout@v6with an arbitraryrefinput leaves the repo on that ref - typically detached HEAD, and nevermainwhen publishing a feature-branch prerelease, which is the entire reason this workflow exists separately fromnode-release.yml. So any attempt to actually use it for that purpose would fail this check.The equivalent workflow in
millicast-sdkalready has--no-git-checks(and adryruninput) - this brings this repo's copy in line with that.Changes
--no-git-checksto thepnpm publishinvocation.dryruninput /--dry-runwiring the SDK's version has, so a publish can be validated without touching the registry.Test plan
python3 -c "import yaml; yaml.safe_load(...)").node-release.yml's existingworkflow_callsite doesn't passdryrun, so it's a no-op there (defaults to'false').dryrun.ymlis unrelated (separate per-push CI check, doesn't call this workflow).@millicast/vue-viewer-plugin@1.8.3-pcrepair.0fromdevin/OPTI-4246-relayonly-pcrepairto validate end-to-end.