-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
Description
- Target: any
In my workflow, I have to build an application, then test it, and ONLY then publish it.
To build an application without publishing, I use the command
electron-builder -p never
But how can I only publish? I already have an builded application and want to publish it. How can I do this. Is there any custom parameter to skip compilation and just publish the assembly. Something like this:
electron-builder --prebuilded <build dir> -p always
rkgrep, cawa-93, hugozap, megahertz, hgouveia and 37 more
Activity
[-]How to only publish[/-][+]How to only publish?[/+]stale commentedon Feb 13, 2020
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
hgouveia commentedon Apr 2, 2020
i am also interested in this functionality , i already has the installer using
--publish never
but now in later stage i want to publish it to S3, but without rebuilding it, i would like something--distrib ./build/myinstaller.exe --c.publish.channel=channel
as a workaround i did my custom publisher, that i can trigger separatly and specify a file,
in case is useful : https://gist.github.com/hgouveia/91727cade15fb931993eedc41efa9a62
cawa-93 commentedon Jun 15, 2020
@develar Is there a chance that this issue will be considered?
MutableLoss commentedon Nov 13, 2020
The project I manage would really benefit from such a feature, as I also use a local build routine (build -> test -> publish), uploading to GitHub.
I build to 4 different targets, so I lose a significant amount of time with each app release because of the extra time taken to build during publishing. While I am planning to switch to a TravisCI setup (for this exact reason), I can still see where this feature could save a lot of time in the build process for myself and many others.
Is there a particular concern with adding a 'publish existing build'? Maybe a concern specific to electron-publish?
cinan commentedon Feb 5, 2021
this issue should be reopened
MutableLoss commentedon Feb 8, 2021
Can any of the maintainers add their thoughts on this addition? At the very least, can someone explain why this hasn't received any attention in the past?
I'm willing to dig into this myself, but I'll be honest, I don't want to waste my time if there are legitimate concerns.
mspoerer commentedon Mar 11, 2021
+1
RobertLowe commentedon Jul 3, 2021
This would be a good workflow add. I typically want to review my build after building, but might not be ready to publish it, if I decide I am, I don't want to necessarily wait for the build time again.
fgu-neo-soft commentedon Jul 8, 2021
Really a must have for my project too !
Please reopen 👍
mmaietta commentedon Jul 9, 2021
I thought that was what
--prepackaged
configuration was supposed to provide.Or are you requesting a way to do it after all processes, just using electron-publish?
My best guess is that only develar was maintaining the project at the time and didn't have time to get to this feature request.
I have no concerns from my side.
MutableLoss commentedon Jul 27, 2021
Thanks @mmaietta !
Exactly to the latter. At the moment there isn't an optimal way to test builds in a publish workflow without having to publish multiple times, or build multiple times. One idea was to reuse the build used for testing with the publish, and remove an additional build process.
3 remaining items
MutableLoss commentedon Dec 7, 2022
So if this isn't resolved, why has it been closed? Is it a feature that's not feasible?
mmaietta commentedon Dec 8, 2022
It's not feasible with the current logic flow.
Happy to accept a community contribution if someone else is willing to investigate. Looks like a good start would be extracting much of the Provider logic to the
packages/electron-publish
subrepo to externalize an API for this "only publish" functionality.MutableLoss commentedon Dec 11, 2022
@mmaietta Ok great, and absolutely! Thanks for the clarification, I definitely wanted to make sure this was something feasibly inline with the project before doing anything else. I'll try to carve out some time for this soon. Cheers 🙌
pelletier197 commentedon Mar 20, 2024
I figure this wasn't added since 2022 ? I have the same requirement, because I have a previous step in my pipeline that signs the executables produced by electron. I absolutely have to upload those executables when publishing, I cannot build them again.
I don't mind doing the manual publish to keygen, but why this is closed if this is such a common use-case?
mmaietta commentedon Mar 20, 2024
I'll see if I can take a stab at this when I find some free time
build
flow) #8150mmaietta commentedon Mar 24, 2024
Created a draft PR #8150 with the following functionality. Still testing locally and trying to get some automated tests set up
Proposed solution
electron-builder publish -f <filepath> -f <filepath2>
publish
directly via electron-builder.js config. Note, it only can access the globalpublish
config, not any nested ones within a specific arch/target since the files provided don't have an associated arch/target.These internally create
UploadTask
s.electron-builder/packages/electron-publish/src/publisher.ts
Lines 29 to 36 in 8160363
safeArtifactName
is calculated internally since it seems Github requires some funky logic.electron-builder/packages/app-builder-lib/src/platformPackager.ts
Lines 741 to 756 in 8160363
Please provide your thoughts and I'll try to incorporate them. Will likely need volunteers to test this feature in their project configurations as well
pelletier197 commentedon Mar 24, 2024
Sounds awesome. Thanks a lot for this!
mmaietta commentedon Apr 3, 2024
Released in v25.0.0-alpha.6
Please give it a shot! It worked well with my mock S3 uploads (minio server) but would like to hear the results of it being used in the wild. Happy to make iterations on the implementation as needed
Looks like I forgot to update the CLI doc files, so I'll get to that next.
CLI is as follows
Only
-f
/--files
are required, but depending on your publish target or custom config filename, you may need to provide the other args.API:
seanssel commentedon Apr 1, 2025
@mmaietta I'm probably missing something, but when I try to use the cli with a js config that extends a base config I get an
unable to find any publish configuration
error.E.g. I have an
electron-builder-common.js
config without a publish configuration. Myelectron-builder-staging.js
config extends common and has a publish configuration at the top level.mmaietta commentedon Apr 1, 2025
Please open a new issue for your request since this issue is already resolved.
Without much info to go on, my best guess is that your CLI invocation of the publish command is not pointing to the config with the
-c path/to/electron-builder-staging.js
. Nonetheless, please open a new Github issue and follow the issue template to include the necessary relevant data.--policy
) in publish command #9228choegyumin commentedon Jul 31, 2025
This issue has been resolved, but I'm leaving this here for anyone searching for related keywords. (This page comes up first in Google search results)
--policy
option to the 'publish' command to set the trigger (e.g., 'always', 'onTagOrDraft', …)--policy
) in publish command #9228