Skip to content

Added a convenient "throwOnError" method #84

Added a convenient "throwOnError" method

Added a convenient "throwOnError" method #84

Workflow file for this run

name: CI
on: [push, pull_request]
jobs:
setup-compile-test-and-publish:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node:
- 18
- 20
include:
- node: 18
publish: true
continue-on-error: false
continue-on-error: ${{ matrix.continue-on-error == true }}
container:
image: node:${{ matrix.node }}
steps:
- name: Checkout the code
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Install the dependencies
run: yarn install --immutable
- name: Check the code formatting
run: yarn prettier --check .
- name: Compile the code
run: yarn run compile
- name: Test
run: yarn run test
- name: Lint package.json
run: yarn run publint --strict
- name: Publish to npmjs
if: "matrix.publish == true && startsWith(github.ref, 'refs/tags/')"
run: |
npm version --no-git-tag-version ${GITHUB_REF#refs/tags/}
yarn npm publish --tolerate-republish --access public
env:
YARN_NPM_AUTH_TOKEN: ${{ secrets.NPM_REGISTRY_AUTH_TOKEN }}