This guide will help you setup your config files and services, so that you can easily create Github Releases from TravisCI—using Electron-Nuxt.
NOTE: This guide only covers building for MacOS. But with some modifications to the Travis setup, you could probably get Windows and Linux builds too.
There's three environment variables you'll need, that this guide will explain:
- CSC_LINK
- (Optional) CSC_KEY_PASSWORD
- GH_TOKEN
This will allow you to codesign your Mac application.
- Open Xcode > Accounts
- Manage Certificates...
- Find "Developer ID Application"
- Right-click, select "Export". This exports a
.p12
file. NOTE: Remember if you set a password at this step. - Choose destination
- Open Terminal,
- Run
base64 path/to/the/p12/file
- Copy the all the encoded text
Now you need to set up the environment variables for codesigning your Mac application.
- Open the Settings menu for your repository
- Create a new Environment Variable called
CSC_LINK
, and paste your base64 encoded text into the value field - (Optional—if you set a password) Create a new Environment Variable called
CSC_KEY_PASSWORD
, and paste your password into the value field
- Create a Github token https://github.com/settings/tokens and copy the value
- Open the Settings menu for your repository
- Create a new Environment Variable called
GH_TOKEN
, and paste your Github token into the value field
https://www.electron.build/code-signing https://www.electron.build/configuration/publish https://studiolacosanostra.github.io/2019/03/26/Automate-electron-app-release-build-on-github-with-Travis-CI/
wow .... Thanks for this! 👍👍👍👍👍👍👍