Skip to content

Conversation

@lutangar
Copy link

@lutangar lutangar commented Dec 2, 2021

This essentially setup CI/CD as Github actions.

I took some inspirations from https://github.com/Level/leveldown/blob/master/.github/workflows/release.yml to automate the prebuilds.

The test.yml workflow test on a variety of platform and node version.
See for example:
https://github.com/larriereguichet/alphacep-ref-napi/actions/runs/1530682216

The release.yml workflow create the prebuilds artefact create a Github release and publish the package to npm.
See an example of release:
https://github.com/larriereguichet/alphacep-ref-napi/releases/tag/3.0.3

As for the next steps I would recommend to:

  1. Create an alphacep organisation on npm (if not already):
    https://www.npmjs.com/org/create
  2. Generate a publish npm access token:
    https://www.npmjs.com/settings/nshmyrev/tokens
  3. Add it as NPM_TOKEN to the repository secrets:
    https://github.com/alphacep/ref-napi/settings/secrets/actions
  4. Bump version number in package.json and push a new tag to publish the new release:
git tag -f 4.0.1
git push origin --tags

Hope it helps,
Cheers!

...since it's called when the package is installed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant