For each node version it will:
- Setup node;
- Install dependencies with
yarn
; - Run
yarn lint
; - Run
yarn build
; - Run
yarn test
;
When the workflow is run in main
, and the commit is tagged with a tag containing the package (see inputs) name, it will publish to npm (see secrets).
Create a workflow file similar to this:
name: blorgh-react
on:
push:
jobs:
js:
uses: powerhome/github-actions-workflows/.github/workflows/yarn-package.yml@main
with:
package: ${{ github.workflow }}
secrets: inherit
Input | Type | Required | Default |
---|---|---|---|
workdir | string | false | |
node | string | false | '["18", "16"]' |
The following secrets are expected to be available:
Secret | Required |
---|---|
npm_token | true |