Skip to content

19.1.1

19.1.1 #42

Workflow file for this run

name: Publish
on:
push:
tags:
- "v*"
jobs:
publish:
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
permissions:
packages: write
contents: write
id-token: write
steps:
- uses: actions/checkout@v4
- name: Install llvm and clang
run: sudo apt-get install llvm clang
- name: Install CMake
run: sudo apt-get install cmake
- name: Install Ninja
run: sudo apt-get install ninja-build
- name: Install Emscripten
uses: mymindstorm/setup-emsdk@v14
with:
version: 3.1.65
- name: Install Node
uses: actions/setup-node@v4
with:
node-version-file: ".node-version"
registry-url: "https://registry.npmjs.org"
- name: Install wasm-opt
run: |
npm install -g binaryen
- name: Build
run: ./scripts/build.sh
shell: bash
env:
WASM_OPT: 1
- name: Publish to npm
run: cd pkg && npm publish --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- uses: actions/setup-node@v4
with:
node-version-file: ".node-version"
registry-url: "https://npm.pkg.github.com"
- name: Publish to GitHub Packages
run: cd pkg && npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish to jsr.io
run: cd pkg && npx jsr publish
- name: Pack
run: cd pkg && npm pack
- name: Set version
id: vars
run: echo "version=${GITHUB_REF_NAME#v}" >> $GITHUB_OUTPUT
- name: Publish to Github Releases
uses: softprops/action-gh-release@v2
with:
body: clang-format from [LLVM ${{ github.ref_name }}](https://github.com/llvm/llvm-project/releases/tag/llvmorg-${{steps.vars.outputs.version}}).
files: |
pkg/*.tgz
pkg/*.wasm