-
Notifications
You must be signed in to change notification settings - Fork 0
Publishing Artifacts
Travis and AppVeyor support publishing artifacts. But it requires additional configuration. For each CI (since AppVeyor can build only Windows and Travis only MacOS / Linux).
electron-builder allows you to just add GH_TOKEN environment variable and that's all.
Currently, only GitHub Releases is supported.
--publish option values:
| Value | Description |
|---|---|
onTag |
on tag push only |
onTagOrDraft |
on tag push or if draft release exists |
always |
always publish |
never |
never publish |
But please consider using automatic rules instead of explicitly specifying publish:
-
If CI server detected, —
onTagOrDraft.NOTICE: This is the recommended workflow.
-
Draft a new release. Set the "Tag version" to the value of
versionin your applicationpackage.json, and prefix it withv. "Release title" can be anything you want.
- For example, if your application
package.jsonversion is1.0, your draft's "Tag version" would bev1.0.
- Push some commits. Every CI build will update the artifacts attached to this draft.
- Once you are done, publish the release. GitHub will tag the latest commit for you.
The benefit of this workflow is that it allows you to always have the latest artifacts, and the release can be published once it is ready.
- If CI server reports that tag was pushed, —
onTag.
Release will be drafted (if doesn't already exist) and artifacts published only if tag was pushed.
- If npm script named
release, —always.
Add to scripts in the development package.json:
"release": "build"and if you run npm run release, a release will be drafted (if doesn't already exist) and artifacts published.
No option to specify GitHub repository, detected automatically using:
-
repository in the application or development
package.json, - if not set, env
TRAVIS_REPO_SLUGorAPPVEYOR_ACCOUNT_NAME/APPVEYOR_PROJECT_NAMEorCIRCLE_PROJECT_USERNAME/CIRCLE_PROJECT_REPONAME, - if no env, from
.git/configorigin url.