zulip-desktop icon indicating copy to clipboard operation
zulip-desktop copied to clipboard

[WIP] Build app installer via GitHub actions.

Open adityamudgil2505 opened this issue 5 years ago • 5 comments

What's this PR do? This will allow artifacts to upload to the GitHub package registry as draft release. This solves the Issue #406 .

Any background context you want to provide? Earlier we are using Travis CI for macOS and Linux, and appveyor for windows testing. Now we are shifting this to GitHub actions which will also allow artifacts to upload to the GitHub package registry as a draft release. We need to upgrade electron-builder version from 22.3.2 to 22.4.1 so that our windows pipeline will work properly.

You have tested this PR on:

  • [ ] Windows
  • [ ] Linux/Ubuntu
  • [x] macOS

adityamudgil2505 avatar Mar 19 '20 20:03 adityamudgil2505

@priyank-p @akashnimare Linux app is successfully built and the artifact is uploaded in both node versions.Check this link to see the logs and to download the uploaded artifact

But in case of Windows, the build was failed due to the following error Error link and I found that it's a electron-builder version 22.3.2 problem from this https://github.com/electron-userland/electron-builder/pull/4620#issuecomment-592118743

And for mac will successfully build only if we add the environment variable

mac_certs: ${{ secrets.mac_certs }}
mac_certs_password: ${{ secrets.mac_certs_password }}

you can find the working of this in this link

I have one query regarding Linux build, the artifact upload is of size around 400MB and it contains following files after downloading, do we need all of these to build for Linux or only a few of them because its time taking to download all the files. Screenshot 2020-03-20 at 7 40 13 PM

adityamudgil2505 avatar Mar 20 '20 14:03 adityamudgil2505

@adityamudgil2505 For Linux (and for other platform), we do need all the files in dist.

Regarding the windows issue, you can try and downgrade the electron-build and see if it works. If it works. then add a commit changing the version and mention this issue in the commit message.

As for the macOS, once we have everything else working, I think we will push this to a branch in this repository and add the secrets to test if it works. If it works we will push it to master.

Finally, thanks for working on this issue.

priyank-p avatar Mar 20 '20 15:03 priyank-p

@priyank-p I made all the changes. For node-version, there is no way for the latest version in the documentation. We need to set it manually https://github.com/actions/setup-node/issues/61. But I found an open merge request https://github.com/actions/setup-node/pull/104 which solves this issue. After updating the version of Electron-builder from 22.3.2 to 22.4.1 and now the windows pipeline is running fine. Link of Linux, Windows CI

adityamudgil2505 avatar Mar 20 '20 17:03 adityamudgil2505

@priyank-p Please review.

adityamudgil2505 avatar Mar 20 '20 19:03 adityamudgil2505

Heads up @adityamudgil2505, we just merged some commits that conflict with the changes your made in this pull request! You can review this repository's recent commits to see where the conflicts occur. Please rebase your feature branch against the upstream/master branch and resolve your pull request's merge conflicts accordingly.

zulipbot avatar Jul 14 '20 10:07 zulipbot