Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Electron publish #1241

Merged
merged 2 commits into from
Nov 11, 2019
Merged

Electron publish #1241

merged 2 commits into from
Nov 11, 2019

Conversation

campersau
Copy link
Collaborator

based on #1240 this will create a dist folder which contains all zipped builds from electron.
These zips are uploaded as artifacts on AppVeyor for every build and can be release by Travis if a commit in the master branch is tagged.

Maybe we want to automatically create tags during builds on master which then starts another build which creates the actual release.

fixes #1218
fixes #1222

@Hirse
Copy link
Contributor

Hirse commented Nov 3, 2019

Is this deploying on every build or only when the version has increased?

@campersau
Copy link
Collaborator Author

@Hirse both. The electron packages will be available on every build as artifacts on AppVeyor (they keep them for 6 months).
If a commit gets tagged in master then this would produce a GitHub release with all electron packages as artifacts.
See #1218 (comment) for examples.

@campersau campersau force-pushed the electron-publish branch 8 times, most recently from 3fe5123 to edf4bed Compare November 5, 2019 13:10
@campersau
Copy link
Collaborator Author

campersau commented Nov 5, 2019

In the second commit I also enabled automatic version tagging.
Here are the different scenarios:

  • PR with or without package.json version change

    1. Build runs on travis and appveyor.
    2. Electron packages are uploaded as artifacts on appveyor.
  • Commit to master (directly or PR merge) without package.json version change

    1. Build runs on travis and appveyor.
    2. Electron packages are uploaded as artifacts on appveyor.
    3. Travis tries to publish npm package and fails.
  • Commit to master (directly or PR merge) with package.json version change

    1. Build runs on travis and appveyor.
    2. Electron packages are uploaded as artifacts on appveyor.
    3. Travis publishes npm package.
    4. Travis creates a new tag with the updated version number,
    5. The new tag triggers new builds on travis and appveyor.
    6. Electron packages are uploaded as artifacts on appveyor.
    7. Travis deploys a new release on github including electron packages.

Some notes:

  • The deployment of the release and the tag creation are currently using my (campersau) GitHub token. So I guess the releases would always be release with my user.
  • We could provide a bit more details in the release description (body). Maybe we can link to the CHANGELOG.md? DONE

Example: https://github.com/campersau/ungit/releases/tag/release-1.4.48

cc @jung-kim @FredrikNoren

@Hirse
Copy link
Contributor

Hirse commented Nov 5, 2019

The current CHANGELOG would only allow linking to the whole file.
For linking to specific versions, which would be nicer, the format would have to be slightly changed. I would propose adopting this one: https://keepachangelog.com

@campersau campersau force-pushed the electron-publish branch 4 times, most recently from df37705 to 44532e7 Compare November 7, 2019 18:36
@campersau
Copy link
Collaborator Author

campersau commented Nov 7, 2019

@Hirse Yes, that's how it was done before the automatic version updates were introduced.
See #687 (comment)

I have updated the change log to use the https://keepachangelog.com format and also applied all missing tags. (I used git log -m --first-parent -L5,5:package.json to get all the commits which changed the package version and wrote a program for reading the package json on each of the commits and tagging it.)

@Hirse
Copy link
Contributor

Hirse commented Nov 7, 2019

@campersau I noticed the old format after writing my comment. Looks good after transforming it, though some changes might fit better under a "Changed" headline rather than "Fixed".

@campersau
Copy link
Collaborator Author

campersau commented Nov 7, 2019

@Hirse Yeah, maybe. I just selected all versions and went with "Fixed" as default and only changed it to "Added" sometimes.

@campersau
Copy link
Collaborator Author

campersau commented Nov 8, 2019

There is also electron-builder which can build e.g. portable executables with auto update functionality. Which would make this scenario even easier. But let's see first how much demand there is for that after this PR is merged or should we move now?

(Example project which uses it: https://github.com/mifi/lossless-cut/releases)


Edit: electron-builder can't build multiple platforms on one machine; https://www.electron.build/multi-platform-build

@campersau campersau merged commit 6a0b0d1 into master Nov 11, 2019
@campersau campersau deleted the electron-publish branch November 11, 2019 18:01
@campersau campersau mentioned this pull request Nov 11, 2019
@campersau
Copy link
Collaborator Author

The macOS electron packages created by appveyor (windows) for each build don't work because of serveral symlink issues on windows. (electron/packager#984 (comment))
The release packages which are build on travis (linux) do work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Is there a compiled version of ungit? Actual releases?
2 participants