Skip to content

0.1.0

0.1.0 #4

Workflow file for this run

name: Publish
on:
push:
tags:
- "v*"
jobs:
wasm-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dart-lang/setup-dart@v1
- name: Install dependencies
run: dart pub get
- run: dart test
- name: Build
run: scripts/build.sh
shell: bash
- run: npm pack
working-directory: build
- name: Upload
uses: actions/upload-artifact@v4
with:
name: build
path: build
publish-npm:
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
needs: wasm-build
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: build
path: build
- uses: actions/setup-node@v4
with:
node-version-file: ".node-version"
registry-url: "https://registry.npmjs.org"
- name: Publish
working-directory: build
run: npm publish --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
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@v4
- uses: actions/download-artifact@v4
with:
name: build
path: build
- uses: actions/setup-node@v4
with:
node-version-file: ".node-version"
registry-url: "https://registry.npmjs.org"
- name: Publish
working-directory: build
run: npx jsr publish
publish-github:
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
needs: wasm-build
permissions:
packages: write
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: build
path: build
- uses: actions/setup-node@v4
with:
node-version-file: ".node-version"
registry-url: "https://npm.pkg.github.com"
- name: Publish
working-directory: build
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@v4
- uses: actions/download-artifact@v4
with:
name: build
path: build
- name: Package
working-directory: build
run: npm pack
- name: Release
uses: softprops/action-gh-release@9b795e578288d5ff64564dfa7dd4cda7b04bb648
with:
files: |
build/*.tgz
build/*.wasm