Skip to content

feat: rename publish command to release#4305

Draft
claude[bot] wants to merge 1 commit into
nextfrom
publish-to-release
Draft

feat: rename publish command to release#4305
claude[bot] wants to merge 1 commit into
nextfrom
publish-to-release

Conversation

@claude

@claude claude Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Requested by Samuel Attard · Slack thread

  • I have read the contribution documentation for this project.
  • I agree to follow the code of conduct that this project follows, as appropriate.
  • The changes are appropriately documented (if applicable).
  • The changes have sufficient test coverage (if applicable).
  • The testsuite passes successfully on my local machine (if applicable).

Summarize your changes:

Renames the Electron Forge publish command to release, keeping publish as a hidden, deprecated alias. Targets the next (8.0.0) major line.

Closes #2820

Before / After

  • Before: electron-forge publish
  • After: electron-forge release. electron-forge publish still works but is hidden from --help and prints a deprecation warning to stderr before running the same behavior:

    electron-forge publishis deprecated and will be removed in a future major version; useelectron-forge release instead.

How

  • CLI command (packages/api/cli/src/electron-forge.ts): registers release as the primary command and adds publish as a { hidden: true } alias so it no longer appears in --help.
  • Per-command entry file: electron-forge-publish.tselectron-forge-release.ts (via git mv). The release logic is now exported as a reusable runRelease() function, mirroring how electron-forge-make.ts exposes getMakeOptions(). A new thin electron-forge-publish.ts shim prints the deprecation warning and delegates to runRelease(), matching the existing commander executable-subcommand dispatch (commander runs the sibling electron-forge-<command>.js).
  • Core API (packages/api/core/src/api/): publish.tsrelease.ts (via git mv); the default export is now release(), the options interface is ReleaseOptions, and the trace/debug names are release()/electron-forge:release. ForgeAPI.release() is the primary method; ForgeAPI.publish() and the PublishOptions type are kept as @deprecated aliases that forward to release, so existing programmatic consumers keep working.
  • Templates: the base template's package.json publish script is now "release": "electron-forge release"; updated the vite/webpack template verdaccio specs accordingly.
  • Tests: core publish.spec.tsrelease.spec.ts (imports the renamed API); added CLI help assertions that release is listed and the publish alias is hidden.

Scope / tradeoffs

  • The publisher plugin surface (PublisherBase.publish, publisher packages, the Publisher concept, forge config publishers, and internal identifiers like publishTargets/PublishState/publish-dry-run) is intentionally left unchanged — that is a separate, larger surface and out of scope here.
  • The programmatic API rename turned out to be low-risk (the only in-repo consumer of PublishOptions/api.publish was the CLI bin), so the full API rename was done with publish/PublishOptions retained as deprecated aliases rather than the minimal alias-only fallback.

Renames the primary Electron Forge `publish` command to `release` while
keeping `publish` working as a hidden, deprecated alias.

- CLI: register `release` as the primary command and add `publish` as a
  hidden alias that prints a deprecation warning to stderr before
  delegating to the exact same behavior via `runRelease()`.
- Core API: rename the `publish()` API to `release()`
  (src/api/publish.ts -> release.ts, `PublishOptions` -> `ReleaseOptions`).
  Keep `ForgeAPI.publish()` and the `PublishOptions` type as
  `@deprecated` aliases for backward compatibility.
- Templates: base template `package.json` now uses a `release` script
  (`electron-forge release`); update template verdaccio specs.
- Tests: rename core spec to release.spec.ts; add CLI help assertions
  that `release` is listed and `publish` is hidden.

Publisher plugin classes/interfaces and the `Publisher` concept are
intentionally left unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KNJA1Q3Airp39YMZ4k46E8
@github-actions github-actions Bot added the next label Jul 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant