Skip to content

fix(parser/html): add param to void elements list (#4020) #936

fix(parser/html): add param to void elements list (#4020)

fix(parser/html): add param to void elements list (#4020) #936

name: Repository dispatch on main
on:
workflow_dispatch:
push:
branches:
- main
permissions:
contents: read
actions: write
env:
BIOME_WEBSITE_REPO: biomejs/website
BIOME_PUSH_ON_MAIN_EVENT_TYPE: biome-push-on-main-event
WASM_PACK_CACHE_KEY: wasm-pack-cache
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-wasm:
name: Build @biomejs/wasm-web
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Warm up wasm-pack cache
id: cache-restore
uses: actions/cache/restore@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: |
./target
./packages/@biomejs/wasm-web
key: ${{ env.WASM_PACK_CACHE_KEY }}
- name: Install wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- name: Build WASM module for the web
run: wasm-pack build --out-dir ../../packages/@biomejs/wasm-web --target web --profiling --scope biomejs crates/biome_wasm --features experimental-html
# https://github.com/actions/cache/issues/342
- name: Clear old wasm-pack cache
if: ${{ steps.cache-restore.outputs.cache-hit }}
run: |
gh extension install actions/gh-actions-cache
gh actions-cache delete ${{ env.WASM_PACK_CACHE_KEY }} --confirm
env:
GH_TOKEN: ${{ github.token }}
continue-on-error: true
- name: Save new wasm-pack cache
uses: actions/cache/save@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: |
./target
./packages/@biomejs/wasm-web
key: ${{ env.WASM_PACK_CACHE_KEY }}
- name: Install pnpm
run: corepack enable
- name: Setup node
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
with:
node-version: 20
cache: pnpm
- name: Update package.json
working-directory: packages/@biomejs/wasm-web
run: |
npm pkg set name='@biomejs/wasm-web'
npm pkg set version='0.0.0-rev.${{ github.event.head_commit.id }}'
- name: Publish
working-directory: packages/@biomejs/wasm-web
run: pnpx pkg-pr-new publish
repository-dispatch:
name: Repository dispatch
needs: build-wasm
runs-on: ubuntu-latest
steps:
- name: Dispatch event on push
if: ${{ github.event_name == 'push' }}
uses: peter-evans/repository-dispatch@ff45666b9427631e3450c54a1bcbee4d9ff4d7c0 # v3
with:
token: ${{ secrets.BIOME_REPOSITORY_DISPATCH }}
repository: ${{ env.BIOME_WEBSITE_REPO }}
event-type: ${{ env.BIOME_PUSH_ON_MAIN_EVENT_TYPE }}
client-payload: '{"event": ${{ toJson(github.event) }}}'
# For testing only, the payload is mocked
- name: Dispatch event on workflow dispatch
if: ${{ github.event_name == 'workflow_dispatch' }}
uses: peter-evans/repository-dispatch@ff45666b9427631e3450c54a1bcbee4d9ff4d7c0 # v3
with:
token: ${{ secrets.BIOME_REPOSITORY_DISPATCH }}
repository: ${{ env.BIOME_WEBSITE_REPO }}
event-type: ${{ env.BIOME_PUSH_ON_MAIN_EVENT_TYPE }}
client-payload: '{"event": {"head_commit": {"id": "${{ env.GITHUB_SHA }}"}}}'