Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

build: auto release #599

Merged
merged 1 commit into from Jul 31, 2018
Merged

build: auto release #599

merged 1 commit into from Jul 31, 2018

Conversation

mrfelton
Copy link
Member

This PR adds automated release functionality to our CI process. This takes away most of the manual work of creating a release.

We use electron-builder for this.

After all the tests have passed on CI, electron-builder will check if a draft release exists on github and if it finds one it will build the project and attach the build artifacts to the release node.

This runs on travis (builds on/for osx and linux) and appvoyer (builds on/for windows).

Results look like this:

screenshot 2018-07-25 09 44 11

In order to integrate this you need to create a github access token with the public_repo permission and set it in the travis and appvoyer environment variables as GH_TOKEN.

Then, to trigger automate build publishing for an upcoming release:

  1. Draft a new release. Set the “Tag version” to the value of version in your application package.json, and prefix it with v. “Release title” can be anything you want. For example, if your application package.json version is 1.0, your draft’s “Tag version” would be v1.0.
  2. Push some commits. Every CI build will update the artifacts attached to this draft.
  3. 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.

This follows the electron-builder recommended release flow:

https://www.electron.build/configuration/publish#recommended-github-releases-workflow

@mrfelton mrfelton added the scope: devops issues that affect devops label Jul 25, 2018
@mrfelton
Copy link
Member Author

mrfelton commented Jul 25, 2018

You can see an example of a successful build from this here:

https://travis-ci.org/mrfelton/zap-desktop/builds/407861306

screenshot 2018-07-25 20 03 32

@JimmyMow
Copy link
Member

utACK 37bb20d

@Empact Empact added the status: needs rebase Issue needs to be rebased on top of the main branch label Jul 25, 2018
@Empact
Copy link
Contributor

Empact commented Jul 25, 2018

utACK 37bb20d

@mrfelton mrfelton removed the status: needs rebase Issue needs to be rebased on top of the main branch label Jul 26, 2018
@mrfelton mrfelton added this to the v0.2.1 milestone Jul 26, 2018
@mrfelton mrfelton force-pushed the build/publish-zap branch 8 times, most recently from fa41058 to 7af1d00 Compare July 26, 2018 16:25
@coveralls
Copy link

coveralls commented Jul 26, 2018

Pull Request Test Coverage Report for Build 1129

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+29.0%) to 63.636%

Totals Coverage Status
Change from base Build 1119: 29.0%
Covered Lines: 5
Relevant Lines: 7

💛 - Coveralls

@mrfelton mrfelton force-pushed the build/publish-zap branch 2 times, most recently from 38f66de to f0092ae Compare July 26, 2018 19:03
@mrfelton
Copy link
Member Author

@Empact @JimmyMow I've given this PR some pretty extensive testing and now have the automated deployment process fully working. Once merged, every build on the master branch will build all electron targets and then attach to a github draft release whose tag matches the version number in package.json if one exists.

You can see the latest results of this here:

Travis build that triggered the deployments:
https://travis-ci.org/LN-Zap/zap-desktop/builds/408641606

Draft github release with builds attached:
https://github.com/LN-Zap/zap-desktop/releases/tag/untagged-6f67776ef89cc44961a1

As a follow up to this we will need to do #615 so that the builds are properly signed.

Integrate electron-builder with our ci process so that electron builds
are created and published to a github release draft automatically.
@JimmyMow
Copy link
Member

utACK 1ac5271

@JimmyMow JimmyMow merged commit e3528bb into LN-Zap:master Jul 31, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
scope: devops issues that affect devops
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants