Skip to content

Conversation

choegyumin
Copy link
Contributor

@choegyumin choegyumin commented Jul 31, 2025

Related:


Add support for overriding the policy option in the 'publish' command, like the 'build' command:

# 'build' command (pack & publish)
electron-builder --publish always

# 'publish' command (only publish)
electron-builder publish --policy always

This change is necessary to override the intended behavior in the CI environment (See the following code):

const tag = getCiTag()
if (tag != null) {
log.info({ reason: "tag is defined", tag }, "artifacts will be published")
publishOptions.publish = "onTag"
} else if (isCi) {
log.info({ reason: "CI detected" }, "artifacts will be published if draft release exists")
publishOptions.publish = "onTagOrDraft"
}

Currently, the 'publish' command(CLI) has a problem where it cannot read the configuration file path. The following PR resolves issue:

Copy link

changeset-bot bot commented Jul 31, 2025

🦋 Changeset detected

Latest commit: ee248cf

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
electron-builder Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@choegyumin choegyumin marked this pull request as ready for review July 31, 2025 10:13
@choegyumin choegyumin mentioned this pull request Jul 31, 2025
@choegyumin choegyumin changed the title fix: support option to override PublishPolicy in publish command fix: support option to override publish trigger (--policy) in publish command Jul 31, 2025
mmaietta
mmaietta previously approved these changes Jul 31, 2025
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