chore(ci): teach publish.yml to publish @melonjs/capacitor-plugin#1440
Merged
Conversation
Adds `capacitor-plugin` to: - the workflow_dispatch `package` choice list - the `Set package directory` case statement, mapped to `packages/capacitor-plugin` with the `pnpm clean && pnpm build` command (same shape as the other plugins). No other change to the publish flow — `npm publish --access=public --provenance` works identically for the new scoped package, the only prerequisite is that npmjs.com has the trusted-publisher config in place for `@melonjs/capacitor-plugin` (or that the @melonjs scope config covers it). If the first publish fails on missing trust config, set up a "pending publisher" entry on npmjs and re-run. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the manual npm publish workflow to support publishing the new @melonjs/capacitor-plugin package alongside existing plugins.
Changes:
- Adds
capacitor-pluginto theworkflow_dispatch.inputs.packagechoice list. - Adds a corresponding package-directory/build-command selection branch pointing to
packages/capacitor-pluginwithpnpm clean && pnpm build.
Comments suppressed due to low confidence (1)
.github/workflows/publish.yml:75
- The package selection script has no fallback/validation path. If
inputs.packageever contains an unexpected value (e.g., options list changes, or workflow_dispatch is invoked via API),dir/build_cmdwill be unset and later steps will fail with a confusing error. Consider adding a finalelsethat prints an error and exits non-zero (or switch to acasewith a default branch).
elif [ "${{ inputs.package }}" = "capacitor-plugin" ]; then
echo "dir=packages/capacitor-plugin" >> "$GITHUB_OUTPUT"
echo "build_cmd=pnpm clean && pnpm build" >> "$GITHUB_OUTPUT"
elif [ "${{ inputs.package }}" = "create-melonjs" ]; then
echo "dir=packages/create-melonjs" >> "$GITHUB_OUTPUT"
echo "build_cmd=echo 'No build step needed'" >> "$GITHUB_OUTPUT"
fi
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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
Adds
capacitor-pluginto the publish workflow so the new package can be released the same way as the existing plugins.Two-line change:
workflow_dispatch.inputs.packagechoice list.elifbranch in theSet package directorystep, pointing atpackages/capacitor-pluginwithpnpm clean && pnpm build(mirrors the existing plugins' build command).Notes
npm publish --access=public --provenanceworks identically for the new scoped package — no flow changes required.@melonjs/capacitor-plugin(or the@melonjsscope config has to cover it). If the first publish fails on missing trust config, configure a "pending publisher" entry under themelonjsnpm user's package settings and re-run.🤖 Generated with Claude Code