feat!: enforce camelCase browser module filenames (#57) #165
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 and Publish | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| id-token: write # Required for OIDC (npm provenance / trusted publishing) | |
| contents: write # Required for release-please to create branches and PRs | |
| pull-requests: write # Required for release-please to create pull requests | |
| jobs: | |
| release-please: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| release_created: ${{ steps.release.outputs.release_created }} | |
| tag_name: ${{ steps.release.outputs.tag_name }} | |
| steps: | |
| # Config lives in release-please-config.json: every conventional commit | |
| # type is a visible changelog section, so chore/refactor/docs merges cut | |
| # a patch release too (feat still bumps minor, breaking still major). | |
| - uses: googleapis/release-please-action@v4 | |
| if: github.ref == 'refs/heads/main' | |
| id: release | |
| build: | |
| runs-on: ubuntu-latest | |
| needs: [release-please] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: ".nvmrc" | |
| registry-url: "https://registry.npmjs.org" | |
| - name: Update npm | |
| run: npm install -g npm@latest | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v5 | |
| with: | |
| run_install: false | |
| - name: Get pnpm store directory | |
| id: pnpm-cache | |
| shell: bash | |
| run: echo "STORE_PATH=$(pnpm store path)" >> "$GITHUB_OUTPUT" | |
| - uses: actions/cache@v5 | |
| name: Setup pnpm cache | |
| with: | |
| path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} | |
| key: ${{ runner.os }}-pnpm-store-${{ hashFiles('pnpm-lock.yaml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pnpm-store- | |
| - name: pnpm install | |
| run: pnpm install --frozen-lockfile | |
| - name: Lint (self-check) | |
| run: pnpm run test | |
| - name: Publish to NPM | |
| if: ${{ needs.release-please.outputs.release_created }} | |
| run: pnpm publish --provenance --no-git-checks |