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

Migrate to Github Actions and enable Linux/Windows builds #20

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

anler
Copy link

@anler anler commented Oct 26, 2020

Hello! I've been talking to @yawaramin about making this PR so don't think this is coming out of the blue 😄

The goal of this PR is to also distribute Linux/Windows binaries, not only MacOS. Since I have more experience with Github Actions I'm using that instead of Azure Pipelines.

With this in place, after each PR/commit against master, the pipeline will generate artifacts for each platform and one release artifact including them all:

image

The release artifact is the one ready to be published in NPM and has the following structure:

image

Inside the platforms directory are the artifact for each platform, e.g.:

platforms
├── darwin-x64
│   ├── LICENSE
│   ├── README.md
│   ├── _export
│   │   ├── bsdoc-2e91d43b.tar.gz
│   │   └── opam__s__odoc-opam__c__1.4.1-234b79d9.tar.gz
│   ├── bin
│   │   ├── _storePath
│   │   └── bsdoc
│   ├── esyInstallRelease.js
│   └── package.json

After the package is installed:

  1. The postinstall.js script will be executed which will copy to the root folder the appropriate artifact depending on the current platform and arch
  2. Execute the esyInstallRelease.js script of that artifact.

I also have a published version at @anler/bsdoc that you can test directly if you need so.

Copy link
Collaborator

@yawaramin yawaramin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, can you describe the behaviour of this CI setup in the following scenarios:

  1. Someone sends a PR–does something get built?
  2. Someone merges a commit to master
  3. Someone pushes a new tag

Also, how does a publish get triggered? I would prefer it to be on pushing a tag with a v prefix, e.g. pushing a tag v1.0.0 should trigger publishing to npm. Finally, I'm not sure if I missed it but I didn't see anything here that publishes to npm. Can you point me to the step that does that? Also I'll need to hook it up to my npm publish permissions...


- name: Install Esy
run: |
npm install -g [email protected]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you change this to latest version?

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.

2 participants