chore(release): publish #28
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: | |
| permissions: | |
| contents: write # to create release (changesets/action) | |
| id-token: write # required for provenance and OIDC publish | |
| pull-requests: write # to create pull request (changesets/action) | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: pnpm/action-setup@v4 | |
| with: | |
| version: latest | |
| - uses: actions/setup-node@v5 | |
| with: | |
| cache: pnpm | |
| # emsdk seems to be using Node 22 at the moment so align with that | |
| node-version: 22 | |
| - name: Install deps | |
| run: pnpm install | |
| - name: Setup emsdk | |
| uses: mymindstorm/setup-emsdk@v14 | |
| - name: Setup wabt (for wasm-strip) | |
| uses: mwilliamson/setup-wabt-action@v3 | |
| with: | |
| wabt-version: 1.0.39 | |
| - name: Check wasm-strip version | |
| run: wasm-strip --version | |
| - name: Fetch SQLite source | |
| run: pnpm run fetch | |
| - name: Apply patches | |
| run: pnpm run patch | |
| - name: Build | |
| run: pnpm build | |
| - name: Check formatting | |
| run: pnpm format:check | |
| # Temporary until setup-node action comes with npm version that contains | |
| # OIDC setup by default | |
| - name: Update npm | |
| run: npm update -g npm | |
| - name: Create/update pull request or publish | |
| if: github.repository == 'birchill/nice-sqlite-wasm' && github.ref == 'refs/heads/main' && github.event_name == 'push' | |
| uses: changesets/action@v1 | |
| with: | |
| commit: 'chore(release): publish' | |
| title: 'Publish next version' | |
| publish: pnpm ci:publish | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |