readme #15
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: | |
| pull_request: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| checks: write # needed for checks | |
| id-token: write # needed for npm publish with provenance | |
| contents: write # needed for github release | |
| pull-requests: write # needed for coverage comment | |
| jobs: | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Biome | |
| uses: biomejs/setup-biome@v2 | |
| - name: Lint | |
| run: biome ci --no-errors-on-unmatched . | |
| test: | |
| name: Test | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup and Install | |
| uses: zirkelc/setup-and-install@v1 | |
| with: | |
| node-version: 20 | |
| - name: Build | |
| run: pnpm build | |
| - name: Test | |
| run: pnpm test | |
| preview: | |
| name: Preview | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - run: corepack enable | |
| - name: Setup and Install | |
| uses: zirkelc/setup-and-install@v1 | |
| with: | |
| node-version: 20 | |
| - name: Build | |
| run: pnpm build | |
| - name: Publish Preview | |
| run: npx pkg-pr-new publish --pnpm --packageManager=pnpm | |
| release: | |
| name: Release | |
| runs-on: ubuntu-latest | |
| needs: [lint, test] | |
| if: github.ref == 'refs/heads/main' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup and Install | |
| uses: zirkelc/setup-and-install@v1 | |
| with: | |
| node-version: 20 | |
| - name: Build | |
| run: pnpm build | |
| - name: Publish | |
| uses: zirkelc/npm-publish@v1 | |
| with: | |
| token: ${{ secrets.NPM_TOKEN }} | |
| dry-run: false | |
| provenance: true |