ci(actions): update github action to call npm publish, add npmrc following github and npm docs #45
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: Lint Checks | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] # Remove typescript-migration after completion | |
jobs: | |
prettier: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [14.x, 16.x, 18.x, 20.x] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
# Make sure the actual branch is checked out when running on pull requests | |
ref: ${{ github.event.pull_request.base.ref }} | |
# This is important to fetch the changes to the previous commit | |
fetch-depth: 0 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
# with: | |
# node-version: ${{ matrix.node-version }} | |
- run: npm ci | |
- run: npm run build --if-present | |
- run: npm test |