0.0.5 • Published 6 years ago
@sethvincent/example-github-actions-node v0.0.5
Github Actions node example
This example explores using the new Github actions CI functionality for continuous testing & release.
Overview
- tests and linter are run on every
pushevent - tests and linter are also run on every
releaseevent - if the
releaseaction ispublishedand the tests and linter step passes, the module is published to npm
Release process
- Create a git tag on the
masterbranch usingnpm version major|minor|patch - Push the tag and the version commit to the repo with
git push && git push --tags - Create a release for that tag through the Github UI
- Github Actions will then run the
releaseworkflow and publish the module at that tag
Ideas for improvements
- Creating a git tag could be triggered by an external event, such as an event created by a chat bot
- Automatically put together release notes based on the contents of a
CHANGELOG.mdfile
Configuration
Secret npm token
Create a secret env var called NPM_AUTH_TOKEN that has an authentication token from npm.
Follow Github's instructions for creating and using secrets to add NPM_AUTH_TOKEN.