Skip to content

chore(deps): update rust crate indexmap to 2.7.0 (#4708) #1262

chore(deps): update rust crate indexmap to 2.7.0 (#4708)

chore(deps): update rust crate indexmap to 2.7.0 (#4708) #1262

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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Warm up wasm-pack cache
id: cache-restore
uses: actions/cache/restore@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.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@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.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@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
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 }}"}}}'