initial release #5
This file contains hidden or 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: CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
lint-and-test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- uses: actions/setup-node@v4 | |
with: | |
node-version-file: .nvmrc | |
- name: Install Dependencies | |
run: npm ci --ignore-scripts | |
- name: Build Parser | |
run: node --run build.parser | |
- name: Lint | |
run: node --run lint | |
- name: Run type-check | |
run: tsc --noEmit | |
- name: Run Tests | |
run: node --run test | |
- name: Upload Coverage to Codecov | |
uses: codecov/codecov-action@v2.1.0 | |
with: | |
directory: . | |
release: | |
runs-on: ubuntu-latest | |
needs: | |
- lint-and-test | |
if: startsWith(github.ref, 'refs/tags/') | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version-file: .nvmrc | |
- name: Install Dependencies | |
run: npm ci --ignore-scripts | |
- name: Build Parser | |
run: node --run build.parser | |
- name: Build Code | |
run: node --run build | |
- name: Login to NPM | |
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc | |
- name: Publish to NPM | |
run: npm publish |