Pietro Passarelli

Electron github travis CI & linux



How to setup github for your electron project to have a linux Continuos integration build

Thanks to @probonopd PR autoEdit 2 can compile the application on Travis CI upon each git push, and upload an AppImage to the GitHub Releases page.

This is an attempt to capture some notes on the steps of setting up travis CI integration.

What is an AppImage

AppImages can be downloaded and run without installation or the need for root rights.

Making it executable

You can make the appImage executable as follows:

chmod a+x exampleName.AppImage

Or see also how to make an AppImage executable for easier users instructions using GUI

Executing it

You can execute an appImage as follows:

./exampleName.AppImage

AppImage advantages

Providing an AppImage would have, among others, these advantages:

  • Applications packaged as an AppImage can run on many distributions (including Ubuntu, Fedora, openSUSE, CentOS, elementaryOS, Linux Mint, and others)
  • One app = one file = super simple for users: just download one AppImage file, make it executable, and run
  • No unpacking or installation necessary
  • No root needed
  • No system libraries changed
  • Works out of the box, no installation of runtimes needed
  • Optional desktop integration with appimaged
  • Optional binary delta updates, e.g., for continuous builds (only download the binary diff) using AppImageUpdate
  • Can optionally GPG2-sign your AppImages (inside the file)
  • Works on Live ISOs
  • Can use the same AppImages when dual-booting multiple distributions
  • Can be listed in the AppImageHub central directory of available AppImages
  • Can double as a self-extracting compressed archive with the --appimage-extract parameter

Here is an overview of projects that are already distributing upstream-provided, official AppImages.

If you have questions, AppImage developers are on #AppImage on irc.freenode.net.

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

See exampe in README of probonopd/uploadtool as well as example below from autoEdit .travis.yml or from subtitlesComposer-app .travis.yml.

package.json

To add linux see example