Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions .github/workflows/release-wasm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Release WASM Package

on:
release:
types: [published]
workflow_dispatch:
pull_request:

jobs:
publish-wasm:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Checkout code
uses: actions/checkout@v6
with:
ref: ${{ github.event.release.tag_name || github.ref }}

# - name: Get release version
# id: version
# run: |
# NEW_VERSION=$(cargo metadata --no-deps --format-version 1 | jq -r '.workspace_members[0]' | cut -d '#' -f2)
# echo "new_version=$NEW_VERSION" >> "$GITHUB_OUTPUT"

- name: Install Nix
uses: cachix/install-nix-action@v31

- name: Build WASM package
run: ./nix/build-wasm.sh

- name: Set up Node
uses: actions/setup-node@v6
with:
node-version: 22
registry-url: https://npm.pkg.github.com
scope: "@worldcoin"

- name: Install package build dependencies
working-directory: wasm
run: npm ci

- name: Build JS package
working-directory: wasm
run: npm run build:js

# - name: Set package version
# working-directory: wasm
# run: npm pkg set version="${{ steps.version.outputs.new_version }}"

- name: Publish package
working-directory: wasm
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ github.token }}
Loading
Loading