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.
This commit is contained in:
Ade Attwood 2023-02-10 07:48:14 +00:00
parent 750f106c41
commit 30202490be
2 changed files with 8 additions and 4 deletions

View file

@ -13,8 +13,10 @@ jobs:
uses: actions/checkout@v3
- name: Set up Node
uses: actions/setup-node@v2
with: { node-version: 18 }
uses: actions/setup-node@v3
with:
node-version: 18
cache: yarn
- name: Install dependencies
run: yarn install

View file

@ -8,15 +8,17 @@ on:
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@v2
uses: actions/setup-node@v3
with:
node-version: '14'
node-version: 18
registry-url: 'https://registry.npmjs.org'
cache: yarn
- name: Install dependencies and build
run: yarn install && yarn build