Skip to content

chore(ci): teach publish.yml to publish @melonjs/capacitor-plugin#1440

Merged
obiot merged 1 commit into
masterfrom
chore/publish-capacitor-plugin
May 10, 2026
Merged

chore(ci): teach publish.yml to publish @melonjs/capacitor-plugin#1440
obiot merged 1 commit into
masterfrom
chore/publish-capacitor-plugin

Conversation

@obiot
Copy link
Copy Markdown
Member

@obiot obiot commented May 10, 2026

Summary

Adds capacitor-plugin to the publish workflow so the new package can be released the same way as the existing plugins.

Two-line change:

  • New entry in the workflow_dispatch.inputs.package choice list.
  • New elif branch in the Set package directory step, pointing at packages/capacitor-plugin with pnpm clean && pnpm build (mirrors the existing plugins' build command).

Notes

  • npm publish --access=public --provenance works identically for the new scoped package — no flow changes required.
  • One-time prerequisite: npmjs.com needs a trusted-publisher entry for @melonjs/capacitor-plugin (or the @melonjs scope config has to cover it). If the first publish fails on missing trust config, configure a "pending publisher" entry under the melonjs npm user's package settings and re-run.

🤖 Generated with Claude Code

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>
Copilot AI review requested due to automatic review settings May 10, 2026 10:32
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the manual npm publish workflow to support publishing the new @melonjs/capacitor-plugin package alongside existing plugins.

Changes:

  • Adds capacitor-plugin to the workflow_dispatch.inputs.package choice list.
  • Adds a corresponding package-directory/build-command selection branch pointing to packages/capacitor-plugin with pnpm 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.package ever contains an unexpected value (e.g., options list changes, or workflow_dispatch is invoked via API), dir/build_cmd will be unset and later steps will fail with a confusing error. Consider adding a final else that prints an error and exits non-zero (or switch to a case with 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.

@obiot obiot merged commit 28a7243 into master May 10, 2026
10 checks passed
@obiot obiot deleted the chore/publish-capacitor-plugin branch May 10, 2026 10:39
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.

2 participants