Travis CI continuous build
current travis setup
There is no deployment as such as it's electron app, so the build described above serves as a packaging of the app for release.
However As of version 1.0.8 support is added for Linux thanks to @probonopd, #36. On commit to master there is a continuous built setup on Travis CI that builds and adds an up to date linux and mac os x release to the release section under release section.
Inspired by this issue In the latest iteration it use electron-builder -mwl --publish alwayson Travis CI Mac OSX instance to package for these platforms,
    Mac
    Linux
    Windows
This is an attempt to capture some notes on the steps of setting up travis CI integration in the current implementation

github + Travis CI

Travis CI Integration

1 - enable Travis CI for your repository as described here
2 - Set up GITHUB_TOKEN in Travis CI for this to work. as described here
(Direct link to Github token here)

Add a .travis.yml file to your repository

1
os: osx
2
osx_image: xcode9.4
3
language: node_js
4
node_js: "8"
5
sudo: required
6
7
env:
8
global:
9
- ELECTRON_CACHE=$HOME/.cache/electron
10
- ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder
11
12
# specifying npm version as
13
# by default travis seemed to sue 4.2.0
14
# https://docs.travis-ci.com/user/languages/javascript-with-nodejs/#using-a-specific-npm-version
15
16
install:
17
- node --version
18
- npm i -g [email protected]
19
- npm --version
20
- npm install
21
- npm run make_js
22
23
script:
24
- npm run build:mwl:publish:always;
25
- ls ./dist;
26
- find . | grep mac.zip;
27
- find . | grep x86_64.AppImage;
28
- find . | grep .exe;
29
30
branches:
31
except:
32
- # Do not build tags that we create when we upload to GitHub Releases
33
- /^(?i:continuous)/
Copied!

package.json

added to the the npm scripts
1
"scripts": {
2
...
3
"build:mwl:publish:always": "electron-builder -mwl --publish always",
4
...
5
}
6
"build": {
7
"publish": {
8
"provider": "github",
9
"releaseType": "prerelease",
10
"vPrefixedTagName": false
11
},
12
....
Copied!

Skipping Code signing on Travis

1
CSC_IDENTITY_AUTO_DISCOVERY=false
Copied!
To disable Code Signing when building for macOS leave all the above vars unset except for CSC_IDENTITY_AUTO_DISCOVERY which needs to be set to false. This can be done by running export CSC_IDENTITY_AUTO_DISCOVERY=false.
Or you can set in travis settings, for ENVs
Another way — set mac.identity to null. You can pass additional configuration using CLI as well: -c.mac.identity=null.
if you skip this the build will fail on travis

Electron builder documentation

more on electron builder here
Last modified 1yr ago