Skip to content

chore: use upstream wasm-pack #90

chore: use upstream wasm-pack

chore: use upstream wasm-pack #90

Workflow file for this run

name: "Build and publish"
on:
pull_request:
types:
- closed
branches:
- main
jobs:
build-and-publish:
if: ${{ github.event.pull_request.merged && startsWith(github.event.pull_request.head.ref, 'bump-') }}
name: Build and publish unified package
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
packages: write
pages: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@v4
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
- name: Activate Nix cache
uses: DeterminateSystems/magic-nix-cache-action@main
- name: Install Node
uses: actions/setup-node@v4
with:
node-version: latest
registry-url: https://registry.npmjs.org
- name: Build unified package
run: nix build
- name: Publish unified package
run: npm publish --access public
working-directory: ./result
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}
- name: Build documentation
run: nix build .#docs
- name: Upload documentation artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./result
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4