API docs. #29
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: build | |
| on: | |
| pull_request: | |
| push: | |
| jobs: | |
| compile: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - run: corepack enable | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| cache: "pnpm" | |
| - name: Compile | |
| run: | | |
| pnpm install | |
| pnpm run compile | |
| test: | |
| needs: | |
| - compile | |
| runs-on: ubuntu-latest | |
| steps: | |
| - run: corepack enable | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| cache: "pnpm" | |
| - name: Test | |
| run: | | |
| pnpm install | |
| pnpm run test | |
| - name: Coverage | |
| run: | | |
| pnpm exec nyc report --reporter=lcov | |
| - name: Report coveralls | |
| run: | | |
| curl -sL https://coveralls.io/coveralls-linux.tar.gz | tar -xz | |
| ./coveralls report ./coverage/lcov.info | |
| env: | |
| COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| publish: | |
| if: startsWith(github.ref, 'refs/tags/') | |
| needs: | |
| - compile | |
| - test | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| id-token: write | |
| steps: | |
| - run: corepack enable | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| cache: pnpm | |
| registry-url: "https://registry.npmjs.org" | |
| - name: Compile | |
| run: | | |
| pnpm install | |
| pnpm run compile | |
| - name: Publish | |
| run: npm publish --access public |