Upgrade to Node-18 and NG-15 #5561
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Node.js Package | |
on: | |
pull_request: | |
branches: | |
- master | |
- Release | |
push: | |
branches: | |
- master | |
- Release | |
- refs/tags/* | |
tags: | |
- '*' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- run: corepack enable && yarn --version | |
- run: yarn install | |
- run: yarn lint | |
- run: yarn build | |
- run: yarn test | |
- name: Create code coverage report | |
run: yarn test:coverage | |
publish-npm: | |
if: startsWith(github.ref, 'refs/tags') | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
registry-url: https://registry.npmjs.org/ | |
- run: corepack enable && yarn --version | |
- run: yarn install | |
- run: yarn build | |
- run: npm publish dist/ccd-case-ui-toolkit --ignore-scripts | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_API_TOKEN }} | |
NPM_PUBLISH_REGISTRY: https://registry.npmjs.org/ | |
publish-gpr: | |
if: startsWith(github.ref, 'refs/tags') | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
registry-url: https://npm.pkg.github.com/ | |
scope: '@hmcts' | |
- run: corepack enable && yarn --version | |
- run: yarn install | |
- run: yarn build | |
- run: npm publish dist/ccd-case-ui-toolkit --ignore-scripts | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_PUBLISH_REGISTRY: https://npm.pkg.github.com/ |