Add npm package with WASM + TypeScript wrapper (#6) #1
Workflow file for this run
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: Publish NPM | |
| on: | |
| push: | |
| tags: ['v*'] | |
| permissions: | |
| id-token: write | |
| contents: read | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: go.mod | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| registry-url: 'https://registry.npmjs.org' | |
| - name: Install latest npm (required for trusted publishing) | |
| run: npm install -g npm@latest | |
| - name: Build WASM and TypeScript | |
| run: bash scripts/build-npm.sh | |
| - name: Publish to npm | |
| working-directory: npm | |
| run: npm publish |