Electron-builder: Where do i specifiy "githubArtifactName" within package.json?

Created on 21 Mar 2017  Â·  10Comments  Â·  Source: electron-userland/electron-builder

  • Version: 15.6.2

  • Target: win32


None of the locations i tried (within package.json) lets me add a custom githubArtifactName (or any properties from latest.yml, like path), my config never passes validation.

Where can i add these custom versionInfoproperties?

my package.json

json ... }, "build": { "win": { "icon": "./icons/win32/icon.ico", "target": [ "nsis" ] }, "nsis": { "artifactName": "${name}-setup-${version}.${ext}", "deleteAppDataOnUninstall": true, "oneClick": false, "runAfterFinish": false } } ...

Thanks, @develar !

deployment feature

Most helpful comment

In the 16.2.0 case fixed.

All 10 comments

You cannot add custom githubArtifactName. Github has weird file name rules and electron-builder computes it for you.

It seems you want to use GitHub urls as generic provider urls, right?

@develar

Thanks for the response! Nope, the problem is that artifactName is formatted ${name}-setup-${version}.${ext}, and is uploaded as such to GitHub, while githubArtifactName is still formatted differently (as ${name}-Setup-${version}.${ext}, note the uppercase "Setup") and does not recognize the renamed actual artifact name in the generated latest.yml (see below):

my latest.yml

version: 4.1.5
releaseDate: '2017-03-21T08:46:38.280Z'
githubArtifactName: pb-for-desktop-Setup-4.1.5.exe
path: pb-for-desktop-setup-4.1.5.exe
sha2: 8958bb0ffe95194077cc58c2e6f1a15835275a7b84ed1c4c91a13cf9989f0677

my release

pb-for-desktop v4.1.5

Ok. So, you want to use GitHub publisher in a standard way and this issue is not related to your publish question in other tickets.

Ok, so you are requesting feature to customise githubArtifactName. Will be implemented.

In the 16.2.0 case fixed.

@develar
You're awesome, thanks a lot. Thanks for this great project. I'll close this issue once i tested it.

@develar
Works like a charm. Thank you a lot.

So per https://github.com/electron-userland/electron-builder/issues/1390#issuecomment-288348743 the ability to customize githubArtifactName is planned?

@krystophv Only if you will provide strong arguments why it can be useful (keep in mind — GitHub file name policy is very strict).

@develar I'm trying to provide 'debug' and production builds for a project through CI servers and have them distributed through the GitHub mechanism. I'm able to distinguish the builds from one another on the CI server through the build.artifactName configuration, but when uploaded to GitHub, both builds produce the same file name and overwrite one another. Having the ability to specify the GitHub artifact name would prevent the file name collision.

@krystophv ... because file name contains build version, but not build number.

Well, maybe it is better to use different product name? Ook. It seems issue should be reopened.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mstralka picture mstralka  Â·  3Comments

NPellet picture NPellet  Â·  3Comments

xingoxu picture xingoxu  Â·  3Comments

noahprince22 picture noahprince22  Â·  3Comments

JohnWeisz picture JohnWeisz  Â·  3Comments