DiffCov/.github/workflows/publish-release.yml
Ade Attwood 092985baf7 chore: update github actions
Update the node version to be consistent between the tests and
publishing.

Adds yarn cacheing to the setup-node action.

Adds a conditional action for the publishing so we don't publish a
release the release tagging fails.
2023-02-10 08:01:53 +00:00

29 lines
698 B
YAML

name: Publish Release
on:
workflow_run:
workflows: ["Conventional Tools Release"]
types: ["completed"]
jobs:
build:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18
registry-url: 'https://registry.npmjs.org'
cache: yarn
- name: Install dependencies and build
run: yarn install && yarn build
- name: Publish package on NPM
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}