This repository was archived by the owner on Sep 19, 2025. It is now read-only.
bump to 0.0.29 #81
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: CI | |
| on: | |
| push: | |
| branches: ['main'] | |
| tags: | |
| - "v*" | |
| pull_request: | |
| branches: ['main'] | |
| workflow_dispatch: | |
| inputs: | |
| tag: | |
| description: 'Tag to release (e.g., v1.2.3)' | |
| required: false | |
| default: '' | |
| jobs: | |
| test: | |
| timeout-minutes: 60 | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.event.inputs.tag || github.ref }} | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: lts/* | |
| - uses: denoland/setup-deno@v2 | |
| with: | |
| deno-version: v2.x | |
| - uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| with: | |
| target: wasm32-unknown-unknown | |
| - run: cargo install wasm-bindgen-cli | |
| - run: make build | |
| - run: make test | |
| release: | |
| if: ${{ github.event.inputs.tag != '' || startsWith(github.ref, 'refs/tags/v') }} | |
| runs-on: ubuntu-24.04 | |
| needs: ['test'] | |
| permissions: | |
| contents: write | |
| id-token: write # The OIDC ID token is used for authentication with JSR. | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.event.inputs.tag || github.ref }} | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| - uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| with: | |
| target: wasm32-unknown-unknown | |
| # we'll need this for both 'zig build' and 'cargo zigbuild' | |
| - uses: mlugg/setup-zig@v1 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20.x' | |
| registry-url: 'https://registry.npmjs.org' | |
| - uses: denoland/setup-deno@v2 | |
| with: | |
| deno-version: v2.x | |
| - run: cargo install cargo-zigbuild wasm-bindgen-cli | |
| - run: make build | |
| - working-directory: ./js | |
| run: | | |
| # jsr and npm don't support links | |
| cp jsr.json package.json | |
| npx jsr publish --allow-slow-types | |
| npm publish --provenance --access public | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| # https://github.com/rust-cross/cargo-zigbuild/issues/18#issuecomment-1076428026 | |
| - name: macOS - Test build with SDKROOT | |
| run: | | |
| curl -sqL https://github.com/phracker/MacOSX-SDKs/releases/download/11.3/MacOSX11.3.sdk.tar.xz | tar -Jx -C /tmp | |
| - | |
| name: Run GoReleaser | |
| uses: goreleaser/goreleaser-action@v6 | |
| with: | |
| # either 'goreleaser' (default) or 'goreleaser-pro' | |
| distribution: goreleaser | |
| # 'latest', 'nightly', or a semver | |
| version: '~> v2' | |
| args: release --clean | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| SDKROOT: /tmp/MacOSX11.3.sdk |