This is a set of shared workflows for use with GitHub actions that can be reused across the XIVStats organization and elsewhere.
For further detail on this GitHub feature, check out the GitHub documentation on the topic, for an example of how to invoke a shared workflow please see this example.
xivstats/workflows/.github/workflows/ts-npm-build.yml@main
CODECOV_TOKEN
: token for interfacing with the codecov code analysis platform
For each of the currently supported Node.js versions this workflow will:
- Checkout your repo
- Install dependencies via npm
- Execute unit tests via
test:ci:unit
script - Execute integration tests via
test:ci:integration
script - Publish a test report
- Execute the lint task via
lint
script - Execute a format check via the
format:check
script - Upload code coverage
- Execute build via the
build
script
This workflow assumes you have npm scripts as below specified in package.json
at the root of your project
test:ci:unit
test:ci:integration
lint
format
build
xivstats/workflows/.github/workflows/ts-npm-release.yml@main
GH_PUSH_TOKEN
: access token with permissions to push back to githubNPM_TOKEN
: token for publishing to npmjs registry
For the current LTS node version, this workflow will:
- Checkout your repo
- Install dependencies via npm
- Execute build via the
build
script - Setup the CI's git config to behave as
ReidWeb Automation
- Prepare a new version of the package, generate a changelog update and publish a release on github.
- Publish the new package verson to GitHub packages
- Commit the changes to the changelog to a commit on a branch.
- Push the changes to a new remote branch on GitHub.
- Release a new version of the package to npmjs registry.
- Submit a pull-request (which will be automatically approved).
This workflow assumes you have npm scripts as below specified in package.json
at the root of your project
build
This workflow assumes you have setup the according secrets to allow for publishing and pushing.
xivstats/workflows/.github/workflows/autoapprove.yml@main
This workflow automatically approves any pull requests coming from releases (as above) made by reidweb-automation
or any pull requests coming in from dependabot.
This allows for the trivial tasks of finalizing release changelog updates and merging security dependency updates to be completely automated.