2.0.2 #79
Workflow file for this run
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
# This workflow will do a clean install of node dependencies, build the source code and run tests | |
# across different versions of node. Also, if its on master (not a PR) and there is a new version | |
# then it will publish the package. | |
# See: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | |
name: CI Build | |
on: | |
push: | |
branches: [main] | |
tags: ['**'] | |
pull_request: | |
branches: [main] | |
workflow_dispatch: | |
inputs: | |
debug_enabled: | |
type: boolean | |
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)' | |
required: false | |
default: false | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 16 | |
- run: npm ci | |
- run: npm run lint | |
- run: npm run prettier:ci | |
- run: npm run build | |
- run: npm run test:ci | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
- name: npm publish | |
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') && contains(github.ref, '.') }} | |
uses: JS-DevTools/npm-publish@v3 | |
with: | |
access: public | |
token: ${{ secrets.NPM_TOKEN }} | |
# Enable tmate debugging of manually-triggered workflows if the input option was provided | |
- name: Setup tmate session | |
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }} | |
uses: mxschmitt/action-tmate@v3 | |
with: | |
limit-access-to-actor: true |