Closed GabeMedrash closed 4 years ago
Hi Gabe, thanks a lot for the PR!
electron-builder
seems to support external config files already:
❯ yarn run electron-builder --help
...
Building:
...
--config, -c The path to an electron-builder config. Defaults to
`electron-builder.yml` (or `json`, or `json5`), see
https://goo.gl/YFRJOM
Instead of reimplementing that logic in this action, I would prefer an option where such a config path could be specified. That path could then simply be passed along to electron-builder
.
What do you think? :)
Oh, huh. It was difficult to tell from the documentation (so I didn't experiment), but I thought the --config
option was specifically for specifying electron-builder
config in a place other than package.json
or electron-builder.yml
, not a mechanism for deep merging external config with automatically discovered config (like in package.json
). Have you experimented with that?
Essentially the use-case I'm trying to cover here is overriding the version
so that I can accomplish pre-release builds from feature branches. I'm triggering my release
workflow through a repository_dispatch
event, and sending in the git ref
to build from and the version
as a parameter.
Hmm. The CLI and docs really are confusing. I tested this quickly, and it's apparently possible to provide either a file path or a config string. So the CLI help information seems to be outdated.
I would suggest going with a config
option for this action, which just passes its value along to the electron-builder
command (with the --config
flag). That way, all the parsing logic is delegated to electron-builder
.
Makes sense! I'll take a look and update my PR.
So is this PR still move on? it's really a lifesaver.
Any news on this? I need to overwrite the electron-builder config as well.
This can now be achieved with the args
option introduced in v1.5.0.
Hi there,
I just started using this Github action--extremely useful, thank you for it. One piece that I found missing for my use case is the ability to pass a configuration override (e.g.,
-c.extraMetadata.foo=bar
) directly to theelectron-builder build
command.This PR accomplish that in a generic way. From a consumer's workflow yml file, a user can now pass a
config_overrides
object as a JSON string to this action, which will transform it into a properly formed-c.x.y.z=value
config CLI arg. For example, passing:will be passed through to the
electron-builder build
command as-c.extraMetadata.version=4.3.2-snapshot -c.extraMetadata.foo=bar -c.linux.target=deb
.Let me know what you think! Thanks for the consideration, Gabe