0.3.3 #12
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 | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| env: | |
| CARGO_INCREMENTAL: 0 | |
| CARGO_TERM_COLOR: "always" | |
| RUST_LOG: "off" | |
| jobs: | |
| wasm-build: | |
| name: Wasm build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: taiki-e/install-action@v2 | |
| with: | |
| tool: wasm-pack,just | |
| - name: Build wasm | |
| run: just build | |
| - name: Upload | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: build | |
| path: pkg | |
| publish-npm: | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| runs-on: ubuntu-latest | |
| needs: wasm-build | |
| permissions: | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: ".node-version" | |
| registry-url: "https://registry.npmjs.org" | |
| - uses: actions/download-artifact@v8 | |
| with: | |
| name: build | |
| path: pkg/ | |
| - name: Publish | |
| working-directory: pkg | |
| run: npm publish --provenance | |
| publish-jsr: | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| id-token: write | |
| needs: wasm-build | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: ".node-version" | |
| - uses: actions/download-artifact@v8 | |
| with: | |
| name: build | |
| path: pkg/ | |
| - name: Publish | |
| working-directory: pkg | |
| run: npx jsr publish --allow-dirty | |
| publish-github: | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| runs-on: ubuntu-latest | |
| needs: wasm-build | |
| permissions: | |
| packages: write | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: ".node-version" | |
| registry-url: "https://npm.pkg.github.com" | |
| - uses: actions/download-artifact@v8 | |
| with: | |
| name: build | |
| path: pkg/ | |
| - name: Publish | |
| working-directory: pkg | |
| run: npm publish | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| publish-github-release: | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| runs-on: ubuntu-latest | |
| needs: wasm-build | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/download-artifact@v8 | |
| with: | |
| name: build | |
| path: pkg/ | |
| - name: Package | |
| working-directory: pkg | |
| run: npm pack | |
| - name: Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: | | |
| pkg/*.tgz | |
| pkg/*.wasm |