19.1.5 #46
Workflow file for this run
This file contains 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: 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.72 | |
- 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 | |
working-directory: pkg | |
run: 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 | |
working-directory: pkg | |
run: npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Publish to jsr.io | |
working-directory: pkg | |
run: npx jsr publish --allow-dirty | |
- name: Pack | |
working-directory: pkg | |
run: 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 |