biomejs/biome

32 workflows · maturity 67% · 9 patterns · GitHub ↗

Security 25.47/100

Practices

✓ Matrix✓ Permissions○ Security scan○ AI review✓ Cache✓ Concurrency○ Reusable workflows

Detected patterns

Security dimensions

permissions
5.5
security scan
0
supply chain
20
secret handling
0
harden runner
0

Workflows (32)

autofix perms .github/workflows/autofix.yml
Triggers
merge_group, pull_request
Runs on
depot-ubuntu-24.04-arm-16
Jobs
autofix
Actions
moonrepo/setup-rust, tombi-toml/setup-tombi, autofix-ci/action
Commands
  • cargo codegen grammar
  • cargo codegen analyzer
  • cargo codegen-configuration
  • cargo codegen-schema
  • cargo codegen-bindings
  • cargo codegen-migrate
  • cargo fmt --all
  • tombi format
View raw YAML
name: autofix.ci # needed to securely identify the workflow

on:
  merge_group:
  pull_request:
    branches:
      - main
      - next
    paths: # Only run when changes are made to rust code or root Cargo
      - "crates/**"
      - "fuzz/**"
      - "xtask/**"
      - "Cargo.toml"
      - "Cargo.lock"
      - "rust-toolchain.toml"
      - "rustfmt.toml"
permissions:
  contents: read

jobs:
  autofix:
    runs-on: depot-ubuntu-24.04-arm-16
    if: ${{ github.actor != 'autofix-ci[bot]' }}
    steps:
      - name: Checkout branch
        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

      - name: Install toolchain
        uses: moonrepo/setup-rust@abb2d32350334249b178c401e5ec5836e0cd88d3 # v1.3.0
        with:
          components: rustfmt
          cache-base: main
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

      # Run all the codegen
      - name: Run the grammar codegen
        run: cargo codegen grammar
      - name: Run the analyzer codegen
        run: cargo codegen analyzer
      - name: Run the configuration codegen
        run: cargo codegen-configuration
      - name: Run the schema codegen
        run: cargo codegen-schema
      - name: Run the bindings codegen
        run: cargo codegen-bindings
      - name: Run the migrate codegen
        run: cargo codegen-migrate

      # Format Rust and TOML files
      - name: Run format
        run: |
          cargo fmt --all

      - uses: tombi-toml/setup-tombi@cebfd308ba02edadfcee148b7473536990950c92 # v1.0.8
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          version: '0.7.32'

      - name: Format TOML files
        run: tombi format

      - uses: autofix-ci/action@7a166d7532b277f34e16238930461bf77f9d7ed8
bench_cli .github/workflows/bench_cli.yml
Triggers
issue_comment
Runs on
depot-ubuntu-24.04-arm-16
Jobs
bench
Actions
moonrepo/setup-rust, peter-evans/create-or-update-comment
Commands
  • cargo build --release --bin biome mkdir -p benchmark/target cp target/release/biome benchmark/target/biome_pr
  • cargo build --release --bin biome cp target/release/biome benchmark/target/biome_main
  • hyperfine -w 2 --export-markdown benchmark_format.md \ -n "biome format (main)" "./biome_main $FORMAT_BENCH_COMMAND" \ -n "biome format (pr)" "./biome_pr $FORMAT_BENCH_COMMAND" hyperfine -w 2 --export-markdown --ignore-failure benchmark_check.md \ -n "biome check (main)" "./biome_main check $CHECK_BENCH_COMMAND" \ -n "biome check (pr)" "./biome_pr check $CHECK_BENCH_COMMAND" cat benchmark_format.md >> benchmark.md echo $'\n' >> benchmark.md cat benchmark_check.md >> benchmark.md
View raw YAML
# CLI benchmark, compares main and PR branch with Hyperfine.
# Comment with text containing `!bench_cli`, a new result will be commented at the bottom of this PR.

name: CLI Benchmark

on:
  issue_comment:
    types: [ created ]

env:
  RUST_LOG: info

jobs:
  bench:
    permissions:
      pull-requests: write
    name: Bench
    if: github.event.issue.pull_request && contains(github.event.comment.body, '!bench_cli')
    runs-on: depot-ubuntu-24.04-arm-16

    steps:
      - name: Get PR SHA
        id: sha
        uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
        with:
          result-encoding: string
          script: |
            const response = await github.request(context.payload.issue.pull_request.url);
            return response.data.head.sha;

      - name: Checkout PR Branch
        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
        with:
          ref: ${{ steps.sha.outputs.result }}

      - name: Install toolchain
        uses: moonrepo/setup-rust@abb2d32350334249b178c401e5ec5836e0cd88d3 # v1.3.0
        with:
          channel: stable
          bins: hyperfine
          cache-target: release
          cache-base: main
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

      - name: Compile on PR Branch
        run: |
          cargo build --release --bin biome
          mkdir -p benchmark/target
          cp target/release/biome benchmark/target/biome_pr

      - name: Checkout Main Branch
        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
        with:
          clean: false
          ref: main

      - name: Compile on Main Branch
        run: |
          cargo build --release --bin biome
          cp target/release/biome benchmark/target/biome_main

      - name: Checkout webpack
        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
        with:
          repository: webpack/webpack
          path: benchmark/target/webpack
      - name: Checkout prettier
        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
        with:
          repository: prettier/prettier
          path: benchmark/target/prettier
      - name: Checkout eslint
        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
        with:
          repository: eslint/eslint
          path: benchmark/target/eslint

      - name: Run Benchmarks
        id: benchmarks
        working-directory: benchmark/target
        env:
          FORMAT_BENCH_COMMAND: "format webpack/lib webpack/examples webpack/declarations webpack/benchmark prettier/src prettier/scripts --write"
          CHECK_BENCH_COMMAND: "--max-diagnostics=0 eslint/lib eslint/messages eslint/tests/lib eslint/tests/performance eslint/tools webpack/lib --no-errors-on-unmatched"
        run: |
          hyperfine -w 2 --export-markdown benchmark_format.md \
            -n "biome format (main)" "./biome_main $FORMAT_BENCH_COMMAND" \
            -n "biome format (pr)" "./biome_pr $FORMAT_BENCH_COMMAND"
          hyperfine -w 2 --export-markdown --ignore-failure benchmark_check.md \
            -n "biome check (main)" "./biome_main check $CHECK_BENCH_COMMAND" \
            -n "biome check (pr)" "./biome_pr check $CHECK_BENCH_COMMAND"
          cat benchmark_format.md >> benchmark.md
          echo $'\n' >> benchmark.md
          cat benchmark_check.md >> benchmark.md

      - name: Write a new comment
        # Check if the event is not triggered by a fork
        if: github.event.pull_request.head.repo.full_name == github.repository
        uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5.0.0
        continue-on-error: true
        with:
          issue-number: ${{ github.event.issue.number }}
          body-file: benchmark/target/benchmark.md
benchmark_configuration matrix .github/workflows/benchmark_configuration.yml
Triggers
workflow_dispatch, merge_group, pull_request, push
Runs on
depot-ubuntu-24.04-arm-16
Jobs
bench
Matrix
package→ biome_configuration
Actions
moonrepo/setup-rust, CodSpeedHQ/action
Commands
  • cargo codspeed build -p ${{ matrix.package }}
View raw YAML
name: Benchmarks Configuration

on:
  workflow_dispatch:
  merge_group:
  pull_request:
    types: [ opened, synchronize ]
    branches:
      - main
      - next
    paths:
      - 'Cargo.lock'
      - 'crates/biome_configuration/**/*.rs'
      - 'crates/biome_rowan/**/*.rs'
  push:
    branches:
      - main
      - next
    paths:
      - 'Cargo.lock'
      - 'crates/biome_configuration/**/*.rs'
      - 'crates/biome_rowan/**/*.rs'

env:
  RUST_LOG: info

jobs:
  bench:
    permissions:
      contents: read
      pull-requests: write
    name: Bench
    runs-on: depot-ubuntu-24.04-arm-16
    strategy:
      matrix:
        package:
          - biome_configuration

    steps:

      - name: Checkout PR Branch
        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
        with:
          ref: ${{ github.event.pull_request.head.sha || github.sha }}

      - name: Install toolchain
        uses: moonrepo/setup-rust@abb2d32350334249b178c401e5ec5836e0cd88d3 # v1.3.0
        with:
          channel: stable
          cache-target: release
          bins: cargo-codspeed
          cache-base: main
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

      - name: Compile
        timeout-minutes: 20
        run: cargo codspeed build -p ${{ matrix.package }}
        env:
          CARGO_BUILD_JOBS: 3  # Default is 4 (equals to the vCPU count of the runner), which leads OOM on cargo build

      - name: Run the benchmarks
        uses: CodSpeedHQ/action@1c8ae4843586d3ba879736b7f6b7b0c990757fab # v4.12.1
        timeout-minutes: 50
        with:
          mode: simulation
          run: cargo codspeed run
          token: ${{ secrets.CODSPEED_TOKEN }}
benchmark_css matrix .github/workflows/benchmark_css.yml
Triggers
workflow_dispatch, merge_group, pull_request, push
Runs on
depot-ubuntu-24.04-arm-16
Jobs
bench
Matrix
package→ biome_css_analyze, biome_css_formatter, biome_css_parser
Actions
moonrepo/setup-rust, CodSpeedHQ/action
Commands
  • cargo codspeed build -p ${{ matrix.package }}
View raw YAML
name: Benchmarks CSS

on:
  workflow_dispatch:
  merge_group:
  pull_request:
    types: [ opened, synchronize ]
    branches:
      - main
      - next
    paths:
      - 'Cargo.lock'
      - 'crates/biome_analyze/**/*.rs'
      - 'crates/biome_css_analyze/**/*.rs'
      - 'crates/biome_css_formatter/**/*.rs'
      - 'crates/biome_css_parser/**/*.rs'
      - 'crates/biome_css_*/**/*.rs'
      - 'crates/biome_formatter/**/*.rs'
      - 'crates/biome_rowan/**/*.rs'
      - 'crates/biome_parser/**/*.rs'
  push:
    branches:
      - main
      - next
    paths:
      - 'Cargo.lock'
      - 'crates/biome_analyze/**/*.rs'
      - 'crates/biome_css_analyze/**/*.rs'
      - 'crates/biome_css_formatter/**/*.rs'
      - 'crates/biome_css_parser/**/*.rs'
      - 'crates/biome_css_*/**/*.rs'
      - 'crates/biome_formatter/**/*.rs'
      - 'crates/biome_rowan/**/*.rs'
      - 'crates/biome_parser/**/*.rs'

env:
  RUST_LOG: info

jobs:
  bench:
    permissions:
      contents: read
      pull-requests: write
    name: Bench
    runs-on: depot-ubuntu-24.04-arm-16
    strategy:
      matrix:
        package:
          - biome_css_parser
          - biome_css_formatter
          - biome_css_analyze

    steps:

      - name: Checkout PR Branch
        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
        with:
          ref: ${{ github.event.pull_request.head.sha || github.sha }}

      - name: Install toolchain
        uses: moonrepo/setup-rust@abb2d32350334249b178c401e5ec5836e0cd88d3 # v1.3.0
        with:
          channel: stable
          cache-target: release
          bins: cargo-codspeed
          cache-base: main
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

      - name: Compile
        timeout-minutes: 20
        run: cargo codspeed build -p ${{ matrix.package }}
        env:
          CARGO_BUILD_JOBS: 3  # Default is 4 (equals to the vCPU count of the runner), which leads OOM on cargo build

      - name: Run the benchmarks
        uses: CodSpeedHQ/action@1c8ae4843586d3ba879736b7f6b7b0c990757fab # v4.12.1
        timeout-minutes: 50
        with:
          mode: simulation
          run: cargo codspeed run
          token: ${{ secrets.CODSPEED_TOKEN }}
benchmark_graphql matrix .github/workflows/benchmark_graphql.yml
Triggers
workflow_dispatch, merge_group, pull_request, push
Runs on
depot-ubuntu-24.04-arm-16
Jobs
bench
Matrix
package→ biome_graphql_formatter, biome_graphql_parser
Actions
moonrepo/setup-rust, CodSpeedHQ/action
Commands
  • cargo codspeed build -p ${{ matrix.package }}
View raw YAML
name: Benchmarks GraphQL

on:
  workflow_dispatch:
  merge_group:
  pull_request:
    types: [ opened, synchronize ]
    branches:
      - main
      - next
    paths:
      - 'Cargo.lock'
      - 'crates/biome_analyze/**/*.rs'
      - 'crates/biome_graphql_formatter/**/*.rs'
      - 'crates/biome_graphql_parser/**/*.rs'
      - 'crates/biome_graphql_*/**/*.rs'
      - 'crates/biome_formatter/**/*.rs'
      - 'crates/biome_rowan/**/*.rs'
      - 'crates/biome_parser/**/*.rs'
  push:
    branches:
      - main
      - next
    paths:
      - 'Cargo.lock'
      - 'crates/biome_analyze/**/*.rs'
      - 'crates/biome_graphql_formatter/**/*.rs'
      - 'crates/biome_graphql_parser/**/*.rs'
      - 'crates/biome_graphql_*/**/*.rs'
      - 'crates/biome_formatter/**/*.rs'
      - 'crates/biome_rowan/**/*.rs'
      - 'crates/biome_parser/**/*.rs'

env:
  RUST_LOG: info

jobs:
  bench:
    permissions:
      contents: read
      pull-requests: write
    name: Bench
    runs-on: depot-ubuntu-24.04-arm-16
    strategy:
      matrix:
        package:
          - biome_graphql_parser
          - biome_graphql_formatter

    steps:

      - name: Checkout PR Branch
        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
        with:
          ref: ${{ github.event.pull_request.head.sha || github.sha }}

      - name: Install toolchain
        uses: moonrepo/setup-rust@abb2d32350334249b178c401e5ec5836e0cd88d3 # v1.3.0
        with:
          channel: stable
          cache-target: release
          bins: cargo-codspeed
          cache-base: main
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

      - name: Compile
        timeout-minutes: 20
        run: cargo codspeed build -p ${{ matrix.package }}
        env:
          CARGO_BUILD_JOBS: 3  # Default is 4 (equals to the vCPU count of the runner), which leads OOM on cargo build

      - name: Run the benchmarks
        uses: CodSpeedHQ/action@1c8ae4843586d3ba879736b7f6b7b0c990757fab # v4.12.1
        timeout-minutes: 50
        with:
          mode: simulation
          run: cargo codspeed run
          token: ${{ secrets.CODSPEED_TOKEN }}
benchmark_grit matrix .github/workflows/benchmark_grit.yml
Triggers
workflow_dispatch, merge_group, pull_request, push
Runs on
depot-ubuntu-24.04-arm-16
Jobs
bench
Matrix
package→ biome_grit_patterns
Actions
moonrepo/setup-rust, CodSpeedHQ/action
Commands
  • cargo codspeed build -p ${{ matrix.package }}
View raw YAML
name: Benchmarks GritQL

on:
  workflow_dispatch:
  merge_group:
  pull_request:
    types: [ opened, synchronize ]
    branches:
      - main
      - next
    paths:
      - 'Cargo.lock'
      - 'crates/biome_grit_parser/**/*.rs'
      - 'crates/biome_grit_patterns/**/*.rs'
      - 'crates/biome_grit_syntax/**/*.rs'
      - 'crates/biome_rowan/**/*.rs'
  push:
    branches:
      - main
      - next
    paths:
      - 'Cargo.lock'
      - 'crates/biome_grit_parser/**/*.rs'
      - 'crates/biome_grit_patterns/**/*.rs'
      - 'crates/biome_grit_syntax/**/*.rs'
      - 'crates/biome_rowan/**/*.rs'

env:
  RUST_LOG: info

jobs:
  bench:
    permissions:
      contents: read
      pull-requests: write
    name: Bench
    runs-on: depot-ubuntu-24.04-arm-16
    strategy:
      matrix:
        package:
          - biome_grit_patterns

    steps:

      - name: Checkout PR Branch
        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
        with:
          ref: ${{ github.event.pull_request.head.sha || github.sha }}

      - name: Install toolchain
        uses: moonrepo/setup-rust@abb2d32350334249b178c401e5ec5836e0cd88d3 # v1.3.0
        with:
          channel: stable
          cache-target: release
          bins: cargo-codspeed
          cache-base: main
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

      - name: Compile
        timeout-minutes: 20
        run: cargo codspeed build -p ${{ matrix.package }}
        env:
          CARGO_BUILD_JOBS: 3  # Default is 4 (equals to the vCPU count of the runner), which leads OOM on cargo build

      - name: Run the benchmarks
        uses: CodSpeedHQ/action@1c8ae4843586d3ba879736b7f6b7b0c990757fab # v4.12.1
        timeout-minutes: 50
        with:
          mode: simulation
          run: cargo codspeed run
          token: ${{ secrets.CODSPEED_TOKEN }}
benchmark_html matrix .github/workflows/benchmark_html.yml
Triggers
workflow_dispatch, merge_group, pull_request, push
Runs on
depot-ubuntu-24.04-arm-16
Jobs
bench
Matrix
package→ biome_html_analyze, biome_html_formatter, biome_html_parser
Actions
moonrepo/setup-rust, CodSpeedHQ/action
Commands
  • cargo codspeed build -p ${{ matrix.package }}
View raw YAML
name: Benchmarks HTML
on:
  workflow_dispatch:
  merge_group:
  pull_request:
    types: [ opened, synchronize ]
    branches:
      - main
      - next
    paths:
      - 'Cargo.lock'
      - 'crates/biome_analyze/**/*.rs'
      - 'crates/biome_html_analyze/**/*.rs'
      - 'crates/biome_html_formatter/**/*.rs'
      - 'crates/biome_html_parser/**/*.rs'
      - 'crates/biome_html_*/**/*.rs'
      - 'crates/biome_formatter/**/*.rs'
      - 'crates/biome_rowan/**/*.rs'
      - 'crates/biome_parser/**/*.rs'
  push:
    branches:
      - main
      - next
    paths:
      - 'Cargo.lock'
      - 'crates/biome_analyze/**/*.rs'
      - 'crates/biome_html_analyze/**/*.rs'
      - 'crates/biome_html_formatter/**/*.rs'
      - 'crates/biome_html_parser/**/*.rs'
      - 'crates/biome_html_*/**/*.rs'
      - 'crates/biome_formatter/**/*.rs'
      - 'crates/biome_rowan/**/*.rs'
      - 'crates/biome_parser/**/*.rs'

env:
  RUST_LOG: info

jobs:
  bench:
    permissions:
      contents: read
      pull-requests: write
    name: Bench
    runs-on: depot-ubuntu-24.04-arm-16
    strategy:
      matrix:
        package:
          - biome_html_parser
          - biome_html_formatter
          - biome_html_analyze

    steps:

      - name: Checkout PR Branch
        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
        with:
          ref: ${{ github.event.pull_request.head.sha || github.sha }}

      - name: Install toolchain
        uses: moonrepo/setup-rust@abb2d32350334249b178c401e5ec5836e0cd88d3 # v1.3.0
        with:
          channel: stable
          cache-target: release
          bins: cargo-codspeed
          cache-base: main
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

      - name: Compile
        timeout-minutes: 20
        run: cargo codspeed build -p ${{ matrix.package }}
        env:
          CARGO_BUILD_JOBS: 3  # Default is 4 (equals to the vCPU count of the runner), which leads OOM on cargo build

      - name: Run the benchmarks
        uses: CodSpeedHQ/action@1c8ae4843586d3ba879736b7f6b7b0c990757fab # v4.12.1
        timeout-minutes: 50
        with:
          mode: simulation
          run: cargo codspeed run
          token: ${{ secrets.CODSPEED_TOKEN }}
benchmark_js matrix .github/workflows/benchmark_js.yml
Triggers
workflow_dispatch, merge_group, pull_request, push
Runs on
depot-ubuntu-24.04-arm-16
Jobs
bench
Matrix
package→ biome_js_analyze, biome_js_formatter, biome_js_parser
Actions
moonrepo/setup-rust, CodSpeedHQ/action
Commands
  • cargo codspeed build -p ${{ matrix.package }}
View raw YAML
name: Benchmarks JS

on:
  workflow_dispatch:
  merge_group:
  pull_request:
    types: [ opened, synchronize ]
    branches:
      - main
      - next
    paths:
      - 'Cargo.lock'
      - 'crates/biome_analyze/**/*.rs'
      - 'crates/biome_js_analyze/**/*.rs'
      - 'crates/biome_js_formatter/**/*.rs'
      - 'crates/biome_js_parser/**/*.rs'
      - 'crates/biome_js_*/**/*.rs'
      - 'crates/biome_formatter/**/*.rs'
      - 'crates/biome_rowan/**/*.rs'
      - 'crates/biome_parser/**/*.rs'
  push:
    branches:
      - main
      - next
    paths:
      - 'Cargo.lock'
      - 'crates/biome_analyze/**/*.rs'
      - 'crates/biome_js_analyze/**/*.rs'
      - 'crates/biome_js_formatter/**/*.rs'
      - 'crates/biome_js_parser/**/*.rs'
      - 'crates/biome_js_*/**/*.rs'
      - 'crates/biome_formatter/**/*.rs'
      - 'crates/biome_rowan/**/*.rs'
      - 'crates/biome_parser/**/*.rs'

env:
  RUST_LOG: info

jobs:
  bench:
    permissions:
      contents: read
      pull-requests: write
    name: Bench
    runs-on: depot-ubuntu-24.04-arm-16
    strategy:
      matrix:
        package:
          - biome_js_parser
          - biome_js_formatter
          - biome_js_analyze

    steps:

      - name: Checkout PR Branch
        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
        with:
          ref: ${{ github.event.pull_request.head.sha || github.sha }}

      - name: Install toolchain
        uses: moonrepo/setup-rust@abb2d32350334249b178c401e5ec5836e0cd88d3 # v1.3.0
        with:
          channel: stable
          cache-target: release
          bins: cargo-codspeed
          cache-base: main
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

      - name: Compile
        timeout-minutes: 20
        run: cargo codspeed build -p ${{ matrix.package }}
        env:
          CARGO_BUILD_JOBS: 3  # Default is 4 (equals to the vCPU count of the runner), which leads OOM on cargo build

      - name: Run the benchmarks
        uses: CodSpeedHQ/action@1c8ae4843586d3ba879736b7f6b7b0c990757fab # v4.12.1
        timeout-minutes: 50
        with:
          mode: simulation
          run: cargo codspeed run
          token: ${{ secrets.CODSPEED_TOKEN }}
benchmark_json matrix .github/workflows/benchmark_json.yml
Triggers
workflow_dispatch, merge_group, pull_request, push
Runs on
depot-ubuntu-24.04-arm-16
Jobs
bench
Matrix
package→ biome_json_analyze, biome_json_formatter, biome_json_parser
Actions
moonrepo/setup-rust, CodSpeedHQ/action
Commands
  • cargo codspeed build -p ${{ matrix.package }}
View raw YAML
name: Benchmarks JSON

on:
  workflow_dispatch:
  merge_group:
  pull_request:
    types: [ opened, synchronize ]
    branches:
      - main
      - next
    paths:
      - 'Cargo.lock'
      - 'crates/biome_analyze/**/*.rs'
      - 'crates/biome_json_analyze/**/*.rs'
      - 'crates/biome_json_formatter/**/*.rs'
      - 'crates/biome_json_parser/**/*.rs'
      - 'crates/biome_json_*/**/*.rs'
      - 'crates/biome_formatter/**/*.rs'
      - 'crates/biome_rowan/**/*.rs'
      - 'crates/biome_parser/**/*.rs'
  push:
    branches:
      - main
      - next
    paths:
      - 'Cargo.lock'
      - 'crates/biome_analyze/**/*.rs'
      - 'crates/biome_json_analyze/**/*.rs'
      - 'crates/biome_json_formatter/**/*.rs'
      - 'crates/biome_json_parser/**/*.rs'
      - 'crates/biome_json_*/**/*.rs'
      - 'crates/biome_formatter/**/*.rs'
      - 'crates/biome_rowan/**/*.rs'
      - 'crates/biome_parser/**/*.rs'

env:
  RUST_LOG: info

jobs:
  bench:
    permissions:
      contents: read
      pull-requests: write
    name: Bench
    runs-on: depot-ubuntu-24.04-arm-16
    strategy:
      matrix:
        package:
          - biome_json_parser
          - biome_json_formatter
          - biome_json_analyze

    steps:

      - name: Checkout PR Branch
        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
        with:
          ref: ${{ github.event.pull_request.head.sha || github.sha }}

      - name: Install toolchain
        uses: moonrepo/setup-rust@abb2d32350334249b178c401e5ec5836e0cd88d3 # v1.3.0
        with:
          channel: stable
          cache-target: release
          bins: cargo-codspeed
          cache-base: main
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

      - name: Compile
        timeout-minutes: 20
        run: cargo codspeed build -p ${{ matrix.package }}
        env:
          CARGO_BUILD_JOBS: 3  # Default is 4 (equals to the vCPU count of the runner), which leads OOM on cargo build

      - name: Run the benchmarks
        uses: CodSpeedHQ/action@1c8ae4843586d3ba879736b7f6b7b0c990757fab # v4.12.1
        timeout-minutes: 50
        with:
          mode: simulation
          run: cargo codspeed run
          token: ${{ secrets.CODSPEED_TOKEN }}
benchmark_manifests matrix .github/workflows/benchmark_manifests.yml
Triggers
workflow_dispatch, merge_group, pull_request, push
Runs on
depot-ubuntu-24.04-arm-16
Jobs
bench
Matrix
package→ biome_package
Actions
moonrepo/setup-rust, CodSpeedHQ/action
Commands
  • cargo codspeed build -p ${{ matrix.package }}
View raw YAML
name: Benchmarks Manifests

on:
  workflow_dispatch:
  merge_group:
  pull_request:
    types: [ opened, synchronize ]
    branches:
      - main
      - next
    paths:
      - 'Cargo.lock'
      - 'crates/biome_package/**/*.rs'
      - 'crates/biome_rowan/**/*.rs'
  push:
    branches:
      - main
      - next
    paths:
      - 'Cargo.lock'
      - 'crates/biome_package/**/*.rs'
      - 'crates/biome_rowan/**/*.rs'

env:
  RUST_LOG: info

jobs:
  bench:
    permissions:
      contents: read
      pull-requests: write
    name: Bench
    runs-on: depot-ubuntu-24.04-arm-16
    strategy:
      matrix:
        package:
          - biome_package

    steps:

      - name: Checkout PR Branch
        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
        with:
          ref: ${{ github.event.pull_request.head.sha || github.sha }}

      - name: Install toolchain
        uses: moonrepo/setup-rust@abb2d32350334249b178c401e5ec5836e0cd88d3 # v1.3.0
        with:
          channel: stable
          cache-target: release
          bins: cargo-codspeed
          cache-base: main
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

      - name: Compile
        timeout-minutes: 20
        run: cargo codspeed build -p ${{ matrix.package }}
        env:
          CARGO_BUILD_JOBS: 3  # Default is 4 (equals to the vCPU count of the runner), which leads OOM on cargo build

      - name: Run the benchmarks
        uses: CodSpeedHQ/action@1c8ae4843586d3ba879736b7f6b7b0c990757fab # v4.12.1
        timeout-minutes: 50
        with:
          mode: simulation
          run: cargo codspeed run
          token: ${{ secrets.CODSPEED_TOKEN }}
benchmark_module_graph matrix .github/workflows/benchmark_module_graph.yml
Triggers
workflow_dispatch, merge_group, pull_request, push
Runs on
depot-ubuntu-24.04-arm-16
Jobs
bench
Matrix
package→ biome_module_graph
Actions
moonrepo/setup-rust, CodSpeedHQ/action
Commands
  • cargo codspeed build -p ${{ matrix.package }}
View raw YAML
name: Benchmarks Module Graph

on:
  workflow_dispatch:
  merge_group:
  pull_request:
    types: [ opened, synchronize ]
    branches:
      - main
      - next
    paths:
      - 'Cargo.lock'
      - 'crates/biome_module_graph/**/*.rs'
      - 'crates/biome_rowan/**/*.rs'
  push:
    branches:
      - main
      - next
    paths:
      - 'Cargo.lock'
      - 'crates/biome_module_graph/**/*.rs'
      - 'crates/biome_rowan/**/*.rs'

env:
  RUST_LOG: info

jobs:
  bench:
    permissions:
      contents: read
      pull-requests: write
    name: Bench
    runs-on: depot-ubuntu-24.04-arm-16
    strategy:
      matrix:
        package:
          - biome_module_graph

    steps:

      - name: Checkout PR Branch
        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
        with:
          ref: ${{ github.event.pull_request.head.sha || github.sha }}

      - name: Install toolchain
        uses: moonrepo/setup-rust@abb2d32350334249b178c401e5ec5836e0cd88d3 # v1.3.0
        with:
          channel: stable
          cache-target: release
          bins: cargo-codspeed
          cache-base: main
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

      - name: Compile
        timeout-minutes: 20
        run: cargo codspeed build -p ${{ matrix.package }}
        env:
          CARGO_BUILD_JOBS: 3  # Default is 4 (equals to the vCPU count of the runner), which leads OOM on cargo build

      - name: Run the benchmarks
        uses: CodSpeedHQ/action@1c8ae4843586d3ba879736b7f6b7b0c990757fab # v4.12.1
        timeout-minutes: 50
        with:
          mode: simulation
          run: cargo codspeed run
          token: ${{ secrets.CODSPEED_TOKEN }}
benchmark_tailwind matrix .github/workflows/benchmark_tailwind.yml
Triggers
workflow_dispatch, merge_group, pull_request, push
Runs on
depot-ubuntu-24.04-arm-16
Jobs
bench
Matrix
package→ biome_tailwind_parser
Actions
moonrepo/setup-rust, CodSpeedHQ/action
Commands
  • cargo codspeed build -p ${{ matrix.package }}
View raw YAML
name: Benchmarks Tailwind

on:
  workflow_dispatch:
  merge_group:
  pull_request:
    types: [ opened, synchronize ]
    branches:
      - main
      - next
    paths:
      - "Cargo.lock"
      - "crates/biome_tailwind_parser/**/*.rs"
      - "crates/biome_tailwind_*/**/*.rs"
      - "crates/biome_rowan/**/*.rs"
      - "crates/biome_parser/**/*.rs"
  push:
    branches:
      - main
      - next
    paths:
      - "Cargo.lock"
      - "crates/biome_tailwind_parser/**/*.rs"
      - "crates/biome_tailwind_*/**/*.rs"
      - "crates/biome_rowan/**/*.rs"
      - "crates/biome_parser/**/*.rs"

env:
  RUST_LOG: info

jobs:
  bench:
    permissions:
      contents: read
      pull-requests: write
    name: Bench
    runs-on: depot-ubuntu-24.04-arm-16
    strategy:
      matrix:
        package:
          - biome_tailwind_parser

    steps:
      - name: Checkout PR Branch
        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
        with:
          ref: ${{ github.event.pull_request.head.sha || github.sha }}

      - name: Install toolchain
        uses: moonrepo/setup-rust@abb2d32350334249b178c401e5ec5836e0cd88d3 # v1.3.0
        with:
          channel: stable
          cache-target: release
          bins: cargo-codspeed
          cache-base: main
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

      - name: Compile
        timeout-minutes: 20
        run: cargo codspeed build -p ${{ matrix.package }}
        env:
          CARGO_BUILD_JOBS: 3 # Default is 4 (equals to the vCPU count of the runner), which leads OOM on cargo build

      - name: Run the benchmarks
        uses: CodSpeedHQ/action@1c8ae4843586d3ba879736b7f6b7b0c990757fab # v4.12.1
        timeout-minutes: 50
        with:
          mode: simulation
          run: cargo codspeed run
          token: ${{ secrets.CODSPEED_TOKEN }}
beta matrix .github/workflows/beta.yml
Triggers
workflow_dispatch
Runs on
depot-ubuntu-24.04-arm-small, ${{ matrix.os }}, ${{ matrix.os }}, depot-ubuntu-24.04-arm-16, ubuntu-24.04
Jobs
version, build, build-gnu, build-wasm, publish
Matrix
include, include.code-target, include.os, include.target→ aarch64-apple-darwin, aarch64-pc-windows-msvc, aarch64-unknown-linux-gnu, aarch64-unknown-linux-musl, darwin-arm64, darwin-x64, depot-macos-14, depot-ubuntu-24.04-16, depot-ubuntu-24.04-arm-16, depot-windows-2022-16, linux-arm64, linux-arm64-musl, linux-x64, linux-x64-musl, win32-arm64, win32-x64, x86_64-apple-darwin, x86_64-pc-windows-msvc, x86_64-unknown-linux-gnu, x86_64-unknown-linux-musl
Actions
taiki-e/install-action, extractions/setup-just, moonrepo/setup-rust, softprops/action-gh-release
Commands
  • echo "version=$(node packages/@biomejs/biome/scripts/update-beta-version.mjs)" >> $GITHUB_ENV
  • rustup target add ${{ matrix.target }}
  • sudo apt-get update sudo apt-get install -y musl-tools
  • cargo audit
  • cargo build -p biome_cli --release --target ${{ matrix.target }}
  • mkdir dist cp target/${{ matrix.target }}/release/biome.exe ./dist/biome-${{ matrix.code-target }}.exe
  • mkdir dist cp target/${{ matrix.target }}/release/biome ./dist/biome-${{ matrix.code-target }}
  • echo "JEMALLOC_SYS_WITH_LG_PAGE=16" >> $GITHUB_ENV
View raw YAML
name: Beta release CLI
on:
  workflow_dispatch:
    inputs:
      version:
        type: string
        required: true
        description: The version to release

env:
  INPUT_VERSION: ${{ inputs.version }}
  CARGO_TERM_COLOR: always

jobs:
  version:
    name: Generate version
    runs-on: depot-ubuntu-24.04-arm-small
    outputs:
      version: ${{ env.version }}
    steps:
      - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

      - name: Set beta version
        run: |
          echo "version=$(node packages/@biomejs/biome/scripts/update-beta-version.mjs)" >> $GITHUB_ENV

  build:
    needs: version
    strategy:
      matrix:
        include:
          - os: depot-windows-2022-16
            target: x86_64-pc-windows-msvc
            code-target: win32-x64
          - os: depot-windows-2022-16
            target: aarch64-pc-windows-msvc
            code-target: win32-arm64
          - os: depot-ubuntu-24.04-16
            target: x86_64-unknown-linux-musl
            code-target: linux-x64-musl
          - os: depot-ubuntu-24.04-arm-16
            target: aarch64-unknown-linux-musl
            code-target: linux-arm64-musl
          - os: depot-macos-14
            target: x86_64-apple-darwin
            code-target: darwin-x64
          - os: depot-macos-14
            target: aarch64-apple-darwin
            code-target: darwin-arm64

    name: Package ${{ matrix.code-target }}
    runs-on: ${{ matrix.os }}

    env:
      version: ${{ needs.version.outputs.version }}
    outputs:
      version: ${{ env.version }}

    steps:
      - name: Checkout repository
        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

      - name: Install Rust toolchain
        run: rustup target add ${{ matrix.target }}

      - name: Install musl toolchain
        if: matrix.code-target == 'linux-x64-musl' || matrix.code-target == 'linux-arm64-musl'
        run: |
          sudo apt-get update
          sudo apt-get install -y musl-tools

      - name: Install cargo-audit
        uses: taiki-e/install-action@06203676c62f0d3c765be3f2fcfbebbcb02d09f5 # v2.69.6
        if: matrix.code-target == 'linux-x64-musl'
        with:
          tool: cargo-audit

      - name: Audit crates.io dependencies
        if: matrix.code-target == 'linux-x64-musl'
        run: cargo audit

      # Build the CLI binary
      - name: Build binaries
        run: cargo build -p biome_cli --release --target ${{ matrix.target }}
        env:
          # Strip all debug symbols from the resulting binaries
          RUSTFLAGS: "-C strip=symbols -C codegen-units=1"
          # Inline the version of the npm package in the CLI binary
          BIOME_VERSION: ${{ env.version }}

      # Copy the CLI binary and rename it to include the name of the target platform
      - name: Copy CLI binary
        if: matrix.os == 'depot-windows-2022-16'
        run: |
          mkdir dist
          cp target/${{ matrix.target }}/release/biome.exe ./dist/biome-${{ matrix.code-target }}.exe
      - name: Copy CLI binary
        if: matrix.os != 'depot-windows-2022-16'
        run: |
          mkdir dist
          cp target/${{ matrix.target }}/release/biome ./dist/biome-${{ matrix.code-target }}

      # Upload the CLI binary as a build artifact
      - name: Upload CLI artifact
        uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
        with:
          name: cli-${{ matrix.target }}
          path: ./dist/biome-*
          if-no-files-found: error

  # Build GNU/Linux binaries in Docker, using Debian 11 (bullseye), to support older versions of glibc.
  build-gnu:
    needs: version
    strategy:
      matrix:
        include:
          - os: depot-ubuntu-24.04-16
            target: x86_64-unknown-linux-gnu
            code-target: linux-x64
          - os: depot-ubuntu-24.04-arm-16
            target: aarch64-unknown-linux-gnu
            code-target: linux-arm64

    name: Package ${{ matrix.code-target }}
    runs-on: ${{ matrix.os }}
    container:
      image: rust:1.94.0-bullseye@sha256:16950191527a4cb9e0762d9d48b705a6315158e4035e64f7a93ce8656a1b053c

    env:
      version: ${{ needs.version.outputs.version }}
    outputs:
      version: ${{ env.version }}

    steps:
      - name: Checkout repository
        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

      - name: Set jemalloc page size for linux-arm64
        if: matrix.code-target == 'linux-arm64'
        run: |
          echo "JEMALLOC_SYS_WITH_LG_PAGE=16" >> $GITHUB_ENV

      # Build the CLI binary
      - name: Build binaries
        run: cargo build -p biome_cli --release --target ${{ matrix.target }}
        env:
          # Strip all debug symbols from the resulting binaries
          RUSTFLAGS: "-C strip=symbols -C codegen-units=1"
          # Inline the version of the npm package in the CLI binary
          BIOME_VERSION: ${{ env.version }}

      # Copy the CLI binary and rename it to include the name of the target platform
      - name: Copy CLI binary
        run: |
          mkdir dist
          cp target/${{ matrix.target }}/release/biome ./dist/biome-${{ matrix.code-target }}

      # Upload the CLI binary as a build artifact
      - name: Upload CLI artifact
        uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
        with:
          name: cli-${{ matrix.target }}
          path: ./dist/biome-*
          if-no-files-found: error

  build-wasm:
    needs: version
    name: Build WASM
    runs-on: depot-ubuntu-24.04-arm-16
    steps:
      - name: Checkout repository
        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

      - name: Install just
        uses: extractions/setup-just@f8a3cce218d9f83db3a2ecd90e41ac3de6cdfd9b # v3.1.0

      - name: Install toolchain
        uses: moonrepo/setup-rust@abb2d32350334249b178c401e5ec5836e0cd88d3 # v1.3.0
        with:
          bins: wasm-bindgen-cli@0.2.106, wasm-opt
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

      - name: Build WASM module for bundlers
        run: just build-wasm-bundler
      - name: Build WASM module for node.js
        run: just build-wasm-node
      - name: Build WASM module for the web
        run: just build-wasm-web

      - name: Upload WASM artifact
        uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
        with:
          name: wasm-${{ matrix.target }}
          path: |
            ./packages/@biomejs/wasm-bundler
            ./packages/@biomejs/wasm-nodejs
            ./packages/@biomejs/wasm-web
          if-no-files-found: error

  publish:
    name: Publish
    runs-on: ubuntu-24.04 # Must be a GitHub hosted runner for provenance
    needs:
      - build
      - build-gnu
      - build-wasm
    environment: npm-publish
    permissions:
      contents: write
      id-token: write
    steps:
      - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

      - name: Download CLI artifacts
        uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
        with:
          pattern: cli-*
          merge-multiple: true
      - name: Download WASM artifacts
        uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
        with:
          pattern: wasm-*
          merge-multiple: true
          path: packages/@biomejs

      - name: Install Node.js
        uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
        with:
          node-version: 24.14.0
          registry-url: 'https://registry.npmjs.org'

      - name: Pin Corepack 0.20
        run: |
          echo "Before: corepack => $(corepack --version || echo 'not installed')"
          npm install -g corepack@0.20
          echo "After : corepack => $(corepack --version)"
          corepack enable
          pnpm --version

      - name: Set beta version
        run: node packages/@biomejs/biome/scripts/update-beta-version.mjs

      - name: Generate npm packages
        run: node packages/@biomejs/biome/scripts/generate-packages.mjs

      - name: Publish npm packages as beta
        run: |
          for package in packages/@biomejs/*; do
            if [ $package != "packages/@biomejs/js-api" ] && [ $package != "packages/@biomejs/plugin-api" ]; then
              npm publish $package --tag beta --access public
            fi
          done

      - name: Create GitHub release and tag
        uses: softprops/action-gh-release@153bb8e04406b158c6c84fc1615b65b24149a1fe # v2.6.1
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          name: CLI v${{ needs.build.outputs.version }}
          tag_name: "@biomejs/biome@${{ needs.build.outputs.version }}"
          draft: false
          prerelease: true
          files: |
            biome-*
          fail_on_unmatched_files: true
          generate_release_notes: true
beta_js_api .github/workflows/beta_js_api.yml
Triggers
workflow_dispatch
Runs on
depot-ubuntu-24.04-arm-16, depot-ubuntu-24.04-arm-16, ubuntu-24.04
Jobs
version, build, publish
Actions
extractions/setup-just, pnpm/action-setup, softprops/action-gh-release
Commands
  • echo "version=$(node packages/@biomejs/js-api/scripts/update-beta-version.mjs)" >> $GITHUB_ENV
  • cargo install wasm-bindgen-cli --version 0.2.106
  • cargo install wasm-tools
  • node packages/@biomejs/js-api/scripts/update-beta-version.mjs
  • pnpm --filter @biomejs/js-api run build:wasm-bundler pnpm --filter @biomejs/js-api run build:wasm-node pnpm --filter @biomejs/js-api run build:wasm-web pnpm --filter @biomejs/backend-jsonrpc i pnpm --filter @biomejs/backend-jsonrpc run build
  • pnpm --filter @biomejs/js-api i pnpm --filter @biomejs/js-api run build
  • node packages/@biomejs/js-api/scripts/update-beta-version.mjs
  • npm publish packages/@biomejs/js-api --tag beta --access public
View raw YAML
name: Beta release JavaScript API
on:
  workflow_dispatch:
    inputs:
      version:
        type: string
        required: true
        description: The version to release

env:
  INPUT_VERSION: ${{ inputs.version }}

jobs:
  version:
    name: Generate version
    runs-on: depot-ubuntu-24.04-arm-16
    outputs:
      version: ${{ env.version }}
    steps:
      - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

      - name: Set beta version
        run: |
          echo "version=$(node packages/@biomejs/js-api/scripts/update-beta-version.mjs)" >> $GITHUB_ENV

  build:
    needs: version
    name: Package JavaScript APIs
    runs-on: depot-ubuntu-24.04-arm-16

    env:
      version: ${{ needs.version.outputs.version }}
    outputs:
      version: ${{ env.version }}

    steps:
      - name: Checkout repository
        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

      - name: Install Node.js
        uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
        with:
          node-version: 24.14.0

      - name: Install just
        uses: extractions/setup-just@f8a3cce218d9f83db3a2ecd90e41ac3de6cdfd9b # v3.1.0

      - name: Install wasm-bindgen-cli
        run: cargo install wasm-bindgen-cli --version 0.2.106

      - name: Install wasm-tools
        run: cargo install wasm-tools

      - name: Cache pnpm modules
        uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
        with:
          path: ~/.pnpm-store
          key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
          restore-keys: |
            ${{ runner.os }}-
      - uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v4.4.0

      - name: Set beta version
        run: node packages/@biomejs/js-api/scripts/update-beta-version.mjs

      - name: Compile backends
        run: |
          pnpm --filter @biomejs/js-api run build:wasm-bundler
          pnpm --filter @biomejs/js-api run build:wasm-node
          pnpm --filter @biomejs/js-api run build:wasm-web
          pnpm --filter @biomejs/backend-jsonrpc i
          pnpm --filter @biomejs/backend-jsonrpc run build

      - name: Build package
        run: |
          pnpm --filter @biomejs/js-api i
          pnpm --filter @biomejs/js-api run build

      - name: Upload JS API artifact
        uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
        with:
          name: js-api
          path: |
            ./packages/@biomejs/js-api/dist
          if-no-files-found: error

  publish:
    name: Publish
    runs-on: ubuntu-24.04
    needs: build
    environment: npm-publish
    permissions:
      contents: write
      id-token: write
    steps:
      - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

      - name: Download package artifact
        uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
        with:
          name: js-api
          path: packages/@biomejs/js-api/dist

      - name: Install Node.js
        uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
        with:
          node-version: 24.14.0
          registry-url: 'https://registry.npmjs.org'

      - name: Set beta version
        run: node packages/@biomejs/js-api/scripts/update-beta-version.mjs

      - name: Publish npm package as beta
        run: npm publish packages/@biomejs/js-api --tag beta --access public

      - name: Create GitHub release and tag
        uses: softprops/action-gh-release@153bb8e04406b158c6c84fc1615b65b24149a1fe # v2.6.1
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          name: JavaScript APIs v${{ needs.build.outputs.version }}
          tag_name: "@biomejs/js-api@v${{ needs.build.outputs.version }}"
          draft: false
          prerelease: true
          generate_release_notes: true
close-issue perms .github/workflows/close-issue.yml
Triggers
schedule
Runs on
depot-ubuntu-24.04-arm-small
Jobs
close-issues
Actions
actions-cool/issues-helper
View raw YAML
name: Close issues

on:
  schedule:
    - cron: "0 0 * * *"


permissions:
  issues: write

jobs:
  close-issues:
    if: github.repository == 'biomejs/biome'
    runs-on: depot-ubuntu-24.04-arm-small
    steps:
      - name: Close issue without reproduction
        uses: actions-cool/issues-helper@200c78641dbf33838311e5a1e0c31bbdb92d7cf0 # v3.8.0
        with:
          actions: "close-issues"
          token: ${{ secrets.GITHUB_TOKEN }}
          labels: "S-Needs repro"
          inactive-day: 3
          body: "This issue has been automatically closed because it has been inactive for more than 3 days and it does not have a minimal reproduction."
label-issue perms .github/workflows/label-issue.yaml
Triggers
issues
Runs on
depot-ubuntu-24.04-arm-small
Jobs
label-documentation-issue
Actions
github/issue-labeler
View raw YAML
name: Label issue

on:
  issues:
    types: [opened, reopened, edited]

permissions:
  issues: write
  contents: read

jobs:
  label-documentation-issue:
    name: Label documentation issue
    if: contains(github.event.issue.labels.*.name, 'A-Documentation')
    runs-on: depot-ubuntu-24.04-arm-small
    steps:
      - name: Label documentation issues
        uses: github/issue-labeler@c1b0f9f52a63158c4adc09425e858e87b32e9685 # v3.4
        with:
          repo-token: ${{ secrets.GITHUB_TOKEN }}
          configuration-path: .github/documentation-issue-labeler.yaml
          enable-versioned-regex: 0
          sync-labels: 1
labels .github/workflows/labels.yml
Triggers
pull_request_target
Runs on
depot-ubuntu-24.04-arm-small
Jobs
triage
Actions
actions/labeler
View raw YAML
# Automatically labels PRs based on the configuration file
# you are probably looking for 👉 `.github/labeler.yml`
name: Label PRs

on:
  - pull_request_target

jobs:
  triage:
    permissions:
      contents: read
      pull-requests: write
    runs-on: depot-ubuntu-24.04-arm-small
    if: github.repository_owner == 'biomejs'
    steps:
      - uses: actions/labeler@634933edcd8ababfe52f92936142cc22ac488b1b # v6.0.1
        with:
          repo-token: "${{ secrets.GITHUB_TOKEN }}"
          sync-labels: true
lint_rule_docs .github/workflows/lint_rule_docs.yml
Triggers
merge_group, pull_request, push
Runs on
depot-ubuntu-24.04-arm-16
Jobs
rule_docs
Actions
moonrepo/setup-rust
Commands
  • cargo run -p rules_check
View raw YAML
name: Lint rule docs
on:
  merge_group:
  pull_request:
    branches:
      - main
      - next
    paths:
      # Run only when we change the analyze crates
      - "**/biome_*_analyze/**/*.rs"
      - "**/biome_analyze/**/*.rs"
  push:
    branches:
      - main
      - next
    paths:
      # Run only when we change the analyze crates
      - "**/biome_*_analyze/**/*.rs"
      - "**/biome_analyze/**/*.rs"


# Cancel jobs when the PR is updated
concurrency:
  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
  cancel-in-progress: true

env:
  RUST_LOG: info
  RUST_BACKTRACE: 1
  RUSTUP_WINDOWS_PATH_ADD_BIN: 1

jobs:
  rule_docs:
    name: Validate rules documentation
    runs-on: depot-ubuntu-24.04-arm-16
    steps:
      - name: Checkout PR Branch
        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
      - name: Install toolchain
        uses: moonrepo/setup-rust@abb2d32350334249b178c401e5ec5836e0cd88d3 # v1.3.0
        with:
          cache-base: main
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      - name: Run rules check
        run: cargo run -p rules_check
main matrix .github/workflows/main.yml
Triggers
workflow_dispatch, push
Runs on
depot-ubuntu-24.04-arm, depot-ubuntu-24.04-arm-16, depot-ubuntu-24.04-arm, ${{ matrix.os }}, ${{ matrix.os }}
Jobs
format, lint, check-dependencies, test, coverage
Matrix
include, include.os, os→ depot-macos-14, depot-ubuntu-24.04-arm-16, depot-windows-2022-16
Actions
moonrepo/setup-rust, tombi-toml/setup-tombi, moonrepo/setup-rust, moonrepo/setup-rust, moonrepo/setup-rust, moonrepo/setup-rust
Commands
  • git config core.longpaths true
  • cargo fmt --all --verbose -- --check
  • tombi format --check
  • cargo check --workspace --all-targets --release
  • cargo lint
  • cargo +nightly udeps --all-targets
  • cargo test --workspace --features=js_plugin
  • git config --system core.longpaths true
View raw YAML
# This workflow run when something is pushed on main and it does:
# - normal checks like in the normal PRs
# - expand the test suite to be run on multiple OS
# - runs the coverage and prints in the command line
name: CI on main
on:
  workflow_dispatch:
  push:
    branches:
      - main

env:
  RUST_LOG: info
  RUST_BACKTRACE: 1
  RUSTUP_WINDOWS_PATH_ADD_BIN: 1

jobs:
  format:
    name: Format Rust Files
    runs-on: depot-ubuntu-24.04-arm
    steps:
      - name: Checkout repository
        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
      - name: Support longpaths
        run: git config core.longpaths true
      - name: Checkout repository
        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
      - name: Install toolchain
        uses: moonrepo/setup-rust@abb2d32350334249b178c401e5ec5836e0cd88d3 # v1.3.0
        with:
          components: rustfmt
          cache-base: main
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      - name: Run rustfmt
        run: |
          cargo fmt --all --verbose -- --check
      - uses: tombi-toml/setup-tombi@cebfd308ba02edadfcee148b7473536990950c92 # v1.0.8
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          version: '0.7.32'
      - name: Format TOML files
        run: tombi format --check

  lint:
    name: Lint Rust Files
    runs-on: depot-ubuntu-24.04-arm-16
    steps:
      - name: Checkout repository
        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
      - name: Install toolchain
        uses: moonrepo/setup-rust@abb2d32350334249b178c401e5ec5836e0cd88d3 # v1.3.0
        with:
          components: clippy
          cache-base: main
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      - name: Run cargo check
        run: cargo check --workspace --all-targets --release
      - name: Run clippy
        run: cargo lint

  check-dependencies:
    name: Check Dependencies
    runs-on: depot-ubuntu-24.04-arm
    steps:
      - name: Checkout repository
        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
      - name: Install toolchain
        uses: moonrepo/setup-rust@abb2d32350334249b178c401e5ec5836e0cd88d3 # v1.3.0
        with:
          channel: nightly
          bins: cargo-udeps
          cache: false
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      - name: Run udeps
        run: cargo +nightly udeps --all-targets

  test:
    name: Test
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        include:
          - os: depot-windows-2022-16
          - os: depot-ubuntu-24.04-arm-16
          - os: depot-macos-14
    steps:
      - name: Checkout repository
        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
      - name: Install toolchain
        uses: moonrepo/setup-rust@abb2d32350334249b178c401e5ec5836e0cd88d3 # v1.3.0
        with:
          cache-base: main
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      - name: Run tests on ${{ matrix.os }}
        run: cargo test --workspace --features=js_plugin

  coverage:
    name: Test262 Coverage
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        os: [ depot-windows-2022-16, depot-ubuntu-24.04-arm-16 ]
    steps:
      # ref: https://github.com/orgs/community/discussions/26952
      - name: Support longpaths
        if: matrix.os == 'depot-windows-2022-16'
        run: git config --system core.longpaths true
      - name: Checkout repository
        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
        with:
          submodules: recursive
      - name: Install toolchain
        uses: moonrepo/setup-rust@abb2d32350334249b178c401e5ec5836e0cd88d3 # v1.3.0
        with:
          cache-target: release
          cache-base: main
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      - name: Compile
        run: cargo build --release --locked -p xtask_coverage
      - name: Run Test262 suite
        continue-on-error: true
        run: cargo coverage
      - name: Clean cache
        run: cargo cache --autoclean
needs-repro perms .github/workflows/needs-repro.yml
Triggers
issues
Runs on
depot-ubuntu-24.04-arm-small
Jobs
reply-labeled
Actions
actions-cool/issues-helper, actions-cool/issues-helper
View raw YAML
name: Needs reproduction

on:
  issues:
    types: [ labeled ]

permissions:
  issues: write

jobs:
  reply-labeled:
    if: github.repository == 'biomejs/biome'
    runs-on: depot-ubuntu-24.04-arm-small
    steps:
      - name: Remove triaging label
        if: contains(github.event.issue.labels.*.name, 'S-Bug-confirmed') && contains(github.event.issue.labels.*.name, 'S-Needs triage')
        uses: actions-cool/issues-helper@200c78641dbf33838311e5a1e0c31bbdb92d7cf0 # v3.8.0
        with:
          actions: "remove-labels"
          token: ${{ secrets.GITHUB_TOKEN }}
          issue-number: ${{ github.event.issue.number }}
          labels: "S-Needs triage"

      - name: Needs reproduction
        if: github.event.label.name == 'S-Needs repro'
        uses: actions-cool/issues-helper@200c78641dbf33838311e5a1e0c31bbdb92d7cf0 # v3.8.0
        with:
          actions: "create-comment, remove-labels"
          token: ${{ secrets.GITHUB_TOKEN }}
          issue-number: ${{ github.event.issue.number }}
          body: |
            Hello @${{ github.event.issue.user.login }}, please provide a minimal reproduction. You can use one of the following options:

            - Provide a link to [our playground](https://biomejs.dev/playground), if it's applicable.
            - Provide a link to GitHub repository. To easily create a reproduction, you can use our interactive CLI via `npm create @biomejs/biome-reproduction`

            Issues marked with `S-Needs repro` will be **closed** if they have **no activity within 3 days**.
          labels: "S-Needs triage"
parser_conformance .github/workflows/parser_conformance.yml
Triggers
merge_group, pull_request
Runs on
depot-ubuntu-24.04-arm-16
Jobs
coverage
Actions
moonrepo/setup-rust, kkak10/pr-number-action, peter-evans/find-comment, peter-evans/create-or-update-comment, peter-evans/create-or-update-comment
Commands
  • git config core.longpaths true
  • cargo build --release --locked -p xtask_coverage
  • cargo coverage --json > new_results.json
  • cargo coverage --json > base_results.json
  • echo "## Parser conformance results on ${{ matrix.os }}" > output cargo coverage compare ./base_results.json ./new_results.json --markdown >> output cat output echo "comment<<EOF" >> $GITHUB_OUTPUT cat output >> $GITHUB_OUTPUT echo "EOF" >> $GITHUB_OUTPUT
  • cargo cache --autoclean
View raw YAML
# Test coverage job. It is run on pull request because it prints the results via comment
name: Parser conformance and comparison
on:
  merge_group:
  pull_request:
    branches:
      - main
    paths:
      - 'crates/biome_js_syntax/**'
      - 'crates/biome_js_factory/**'
      - 'crates/biome_js_semantic/**'
      - 'crates/biome_js_parser/**'
      - 'crates/biome_markdown_factory/**'
      - 'crates/biome_markdown_parser/**'
      - 'crates/biome_markdown_syntax/**'
      - 'crates/biome_rowan/**'
      - 'xtask/**'

env:
  RUST_LOG: info
  RUST_BACKTRACE: 1

jobs:
  coverage:
    permissions:
      pull-requests: write
    name: Parser conformance
    runs-on: depot-ubuntu-24.04-arm-16

    steps:
      - name: Checkout PR Branch
        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

      - name: Support longpaths
        run: git config core.longpaths true

      - name: Checkout PR Branch
        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
        with:
          submodules: recursive

      - name: Install toolchain
        uses: moonrepo/setup-rust@abb2d32350334249b178c401e5ec5836e0cd88d3 # v1.3.0
        with:
          cache-target: release
          cache-base: main
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

      - name: Compile
        run: cargo build --release --locked -p xtask_coverage

      - name: Run Test suites
        continue-on-error: true
        run: cargo coverage --json > new_results.json

      - name: Checkout main Branch
        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
        with:
          clean: false
          ref: main
          submodules: recursive

      - name: Run Test suites on main branch
        continue-on-error: true
        run: cargo coverage --json > base_results.json

      - name: Compare results on ${{ matrix.os }}
        if: github.event_name == 'pull_request'
        id: comparison
        shell: bash
        run: |
          echo "## Parser conformance results on ${{ matrix.os }}" > output
          cargo coverage compare ./base_results.json ./new_results.json --markdown >> output
          cat output
          echo "comment<<EOF" >> $GITHUB_OUTPUT
          cat output >> $GITHUB_OUTPUT
          echo "EOF" >> $GITHUB_OUTPUT

      - name: Get the PR number
        if: github.event_name == 'pull_request'
        id: pr-number
        uses: kkak10/pr-number-action@8f5358941366822cd0825e04dfe68437f2f5f15b # v1.3

      - name: Find Previous Comment
        if: github.event_name == 'pull_request'
        uses: peter-evans/find-comment@b30e6a3c0ed37e7c023ccd3f1db5c6c0b0c23aad # v4.0.0
        id: previous-comment
        with:
          issue-number: ${{ steps.pr-number.outputs.pr }}
          body-includes: Parser conformance results on ${{ matrix.os }}

      - name: Update existing comment
        if: github.event_name == 'pull_request' && steps.previous-comment.outputs.comment-id
        uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5.0.0
        continue-on-error: true
        with:
          comment-id: ${{ steps.previous-comment.outputs.comment-id }}
          body: |
            ${{ steps.comparison.outputs.comment }}
          edit-mode: replace

      - name: Write a new comment
        if: github.event_name == 'pull_request' && !steps.previous-comment.outputs.comment-id
        uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5.0.0
        continue-on-error: true
        with:
          issue-number: ${{ steps.pr-number.outputs.pr }}
          body: |
            ${{ steps.comparison.outputs.comment }}

      - name: Clean cache
        run: cargo cache --autoclean
preview matrix .github/workflows/preview.yml
Triggers
workflow_dispatch, schedule
Runs on
depot-ubuntu-24.04-arm, ${{ matrix.os }}, ${{ matrix.os }}, depot-ubuntu-24.04-arm-16, ubuntu-24.04
Jobs
version, build-binaries, build-binaries-gnu, build-wasm, publish
Matrix
include, include.code-target, include.just-recipe, include.os, include.target→ aarch64-apple-darwin, aarch64-pc-windows-msvc, aarch64-unknown-linux-gnu, aarch64-unknown-linux-musl, build-wasm-bundler, build-wasm-node, build-wasm-web, darwin-arm64, darwin-x64, depot-macos-14, depot-ubuntu-24.04-16, depot-ubuntu-24.04-arm-16, depot-windows-2022-16, linux-arm64, linux-arm64-musl, linux-x64, linux-x64-musl, wasm-bundler, wasm-nodejs, wasm-web, win32-arm64, win32-x64, x86_64-apple-darwin, x86_64-pc-windows-msvc, x86_64-unknown-linux-gnu, x86_64-unknown-linux-musl
Actions
taiki-e/install-action, extractions/setup-just, moonrepo/setup-rust, tsickert/discord-webhook
Commands
  • echo "version=$(node packages/@biomejs/biome/scripts/update-preview-version.mjs)" >> $GITHUB_ENV
  • rustup target add ${{ matrix.target }}
  • sudo apt-get update sudo apt-get install -y musl-tools
  • cargo audit
  • cargo build -p biome_cli --release --target=${{ matrix.target }} --features=js_plugin
  • mkdir dist cp target/${{ matrix.target }}/release/biome.exe ./dist/biome-${{ matrix.code-target }}.exe
  • mkdir dist cp target/${{ matrix.target }}/release/biome ./dist/biome-${{ matrix.code-target }}
  • echo "JEMALLOC_SYS_WITH_LG_PAGE=16" >> $GITHUB_ENV
View raw YAML
name: Preview releases
on:
  workflow_dispatch:
  schedule:
    # This cron schedule runs the workflow at midnight (00:00) on Tuesdays and Saturdays.
    - cron: '0 0 * * 2,6'

env:
  CARGO_TERM_COLOR: always

jobs:
  version:
    name: Generate version
    runs-on: depot-ubuntu-24.04-arm
    outputs:
      version: ${{ env.version }}
    steps:
      - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

      - name: Set version
        run: |
          echo "version=$(node packages/@biomejs/biome/scripts/update-preview-version.mjs)" >> $GITHUB_ENV

  build-binaries:
    needs: version
    strategy:
      matrix:
        include:
          - os: depot-windows-2022-16
            target: x86_64-pc-windows-msvc
            code-target: win32-x64
          - os: depot-windows-2022-16
            target: aarch64-pc-windows-msvc
            code-target: win32-arm64
          - os: depot-ubuntu-24.04-16
            target: x86_64-unknown-linux-musl
            code-target: linux-x64-musl
          - os: depot-ubuntu-24.04-arm-16
            target: aarch64-unknown-linux-musl
            code-target: linux-arm64-musl
          - os: depot-macos-14
            target: x86_64-apple-darwin
            code-target: darwin-x64
          - os: depot-macos-14
            target: aarch64-apple-darwin
            code-target: darwin-arm64

    name: Package ${{ matrix.code-target }}
    runs-on: ${{ matrix.os }}

    steps:
      - name: Checkout repository
        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

      - name: Install Rust toolchain
        run: rustup target add ${{ matrix.target }}

      - name: Install musl toolchain
        if: matrix.code-target == 'linux-x64-musl' || matrix.code-target == 'linux-arm64-musl'
        run: |
          sudo apt-get update
          sudo apt-get install -y musl-tools

      - name: Install cargo-audit
        uses: taiki-e/install-action@06203676c62f0d3c765be3f2fcfbebbcb02d09f5 # v2.69.6
        if: matrix.code-target == 'linux-x64-musl'
        with:
          tool: cargo-audit

      - name: Audit crates.io dependencies
        if: matrix.code-target == 'linux-x64-musl'
        run: cargo audit

      # Build the CLI binary
      - name: Build binaries
        run: cargo build -p biome_cli --release --target=${{ matrix.target }} --features=js_plugin
        env:
          # Strip all debug symbols from the resulting binaries
          RUSTFLAGS: "-C strip=symbols -C codegen-units=1"
          # Inline the version of the npm package in the CLI binary
          BIOME_VERSION: ${{ env.cli-version }}

      # Copy the CLI binary and rename it to include the name of the target platform
      - name: Copy CLI binary
        if: matrix.os == 'depot-windows-2022-16'
        run: |
          mkdir dist
          cp target/${{ matrix.target }}/release/biome.exe ./dist/biome-${{ matrix.code-target }}.exe
      - name: Copy CLI binary
        if: matrix.os != 'depot-windows-2022-16'
        run: |
          mkdir dist
          cp target/${{ matrix.target }}/release/biome ./dist/biome-${{ matrix.code-target }}

      # Upload the CLI binary as a build artifact
      - name: Upload CLI artifact
        uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
        with:
          name: cli-${{ matrix.target }}
          path: ./dist/biome-*
          if-no-files-found: error

  # Build GNU/Linux binaries in Docker, using Debian 11 (bullseye), to support older versions of glibc.
  build-binaries-gnu:
    needs: version
    strategy:
      matrix:
        include:
          - os: depot-ubuntu-24.04-16
            target: x86_64-unknown-linux-gnu
            code-target: linux-x64
          - os: depot-ubuntu-24.04-arm-16
            target: aarch64-unknown-linux-gnu
            code-target: linux-arm64

    name: Package ${{ matrix.code-target }}
    runs-on: ${{ matrix.os }}
    container:
      image: rust:1.94.0-bullseye@sha256:16950191527a4cb9e0762d9d48b705a6315158e4035e64f7a93ce8656a1b053c

    steps:
      - name: Checkout repository
        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

      - name: Set jemalloc page size for linux-arm64
        if: matrix.code-target == 'linux-arm64'
        run: |
          echo "JEMALLOC_SYS_WITH_LG_PAGE=16" >> $GITHUB_ENV

      # Build the CLI binary
      - name: Build binaries
        run: cargo build -p biome_cli --release --target=${{ matrix.target }} --features=js_plugin
        env:
          # Strip all debug symbols from the resulting binaries
          RUSTFLAGS: "-C strip=symbols -C codegen-units=1"
          # Inline the version of the npm package in the CLI binary
          BIOME_VERSION: ${{ env.cli-version }}

      # Copy the CLI binary and rename it to include the name of the target platform
      - name: Copy CLI binary
        run: |
          mkdir dist
          cp target/${{ matrix.target }}/release/biome ./dist/biome-${{ matrix.code-target }}

      # Upload the CLI binary as a build artifact
      - name: Upload CLI artifact
        uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
        with:
          name: cli-${{ matrix.target }}
          path: ./dist/biome-*
          if-no-files-found: error

  build-wasm:
    name: Build WASM
    runs-on: depot-ubuntu-24.04-arm-16
    needs: version
    strategy:
      matrix:
        include:
          - target: wasm-bundler
            just-recipe: build-wasm-bundler
          - target: wasm-nodejs
            just-recipe: build-wasm-node
          - target: wasm-web
            just-recipe: build-wasm-web
    steps:
      - name: Checkout repository
        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

      - name: Install just
        uses: extractions/setup-just@f8a3cce218d9f83db3a2ecd90e41ac3de6cdfd9b # v3.1.0

      - name: Install toolchain
        uses: moonrepo/setup-rust@abb2d32350334249b178c401e5ec5836e0cd88d3 # v1.3.0
        with:
          bins: wasm-bindgen-cli@0.2.106, wasm-opt
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

      - name: Build WASM module ${{ matrix.target }}
        run: just ${{ matrix.just-recipe }}

      - name: Upload WASM artifact
        uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
        with:
          name: wasm-${{ matrix.target }}
          path: |
            ./packages/@biomejs/${{ matrix.target }}
          if-no-files-found: error

  publish:
    name: Publish
    runs-on: ubuntu-24.04 # Must be a GitHub hosted runner for provenance
    needs:
      - build-binaries
      - build-binaries-gnu
      - build-wasm
    permissions:
      contents: write
      id-token: write
    steps:
      - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

      - name: Download CLI artifacts
        uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
        with:
          pattern: cli-*
          merge-multiple: true
      - name: Download WASM artifacts
        uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
        with:
          pattern: wasm-*
          merge-multiple: true
          path: packages/@biomejs

      - name: Install Node.js
        uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
        with:
          node-version: 24.14.0
          registry-url: 'https://registry.npmjs.org'

      - name: Pin Corepack 0.20
        run: |
          echo "Before: corepack => $(corepack --version || echo 'not installed')"
          npm install -g corepack@0.20
          echo "After : corepack => $(corepack --version)"
          corepack enable
          pnpm --version

      - name: Generate npm packages
        run: node packages/@biomejs/biome/scripts/generate-packages.mjs

      - name: Publish version
        run: |
          pnpx pkg-pr-new publish --compact \
          './packages/@biomejs/biome' \
          './packages/@biomejs/cli-*' \
          './packages/@biomejs/wasm-*' \
          --json output.json --comment=off

      - name: Read published version
        uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
        id: version-msg
        with:
          script: |
            const fs = require('fs');
            const output = JSON.parse(fs.readFileSync('output.json', 'utf8'));
            const biomePackage = output.packages
              .find((p) => p.name === "@biomejs/biome");

            return "New preview release available for `@biomejs/biome`. Install it using the following command:\n ```bash\n npm i " + biomePackage.url + "\n```";

          result-encoding: string

      - name: Send Discord message
        uses: tsickert/discord-webhook@b217a69502f52803de774ded2b1ab7c282e99645 # v7.0.0
        with:
          webhook-url: ${{ secrets.DISCORD_PREVIEW_RELEASES_HOOK }}
          content: ${{ steps.version-msg.outputs.result }}
publish-crates .github/workflows/publish-crates.yml
Triggers
workflow_dispatch
Runs on
ubuntu-latest
Jobs
publish
Actions
moonrepo/setup-rust
Commands
  • cargo publish --workspace --token ${{ secrets.CRATES_IO_TOKEN }}
View raw YAML
name: Publish to crates.io
on:
  workflow_dispatch:
jobs:
  publish:
    runs-on: ubuntu-latest
    environment: crate-publish
    steps:
      - name: Checkout PR Branch
        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
      - name: Install toolchain
        uses: moonrepo/setup-rust@abb2d32350334249b178c401e5ec5836e0cd88d3 # v1.3.0
        with:
          cache-base: main
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      - run: cargo publish --workspace --token ${{ secrets.CRATES_IO_TOKEN }}
pull_request matrix .github/workflows/pull_request.yml
Triggers
merge_group, pull_request
Runs on
${{ matrix.os }}, depot-ubuntu-24.04-arm, ${{ matrix.os }}, depot-ubuntu-24.04-arm-16, depot-ubuntu-24.04-arm
Jobs
lint, check-dependencies, test, e2e-tests, documentation
Matrix
include, include.os→ depot-ubuntu-24.04-arm-16, depot-windows-2022, depot-windows-2022-16
Actions
moonrepo/setup-rust, moonrepo/setup-rust, moonrepo/setup-rust, moonrepo/setup-rust, moonrepo/setup-rust
Commands
  • cargo lint
  • cargo +nightly udeps --all-targets
  • cargo test --workspace --features=js_plugin
  • cargo build --bin biome
  • cd e2e-tests sh test-all.sh
  • cargo documentation
View raw YAML
# Jobs run on pull request
name: Pull request
on:
  merge_group:
  pull_request:
    branches:
      - main
      - next
    paths: # Only run when changes are made to rust code or root Cargo
      - "crates/**"
      - "fuzz/**"
      - "xtask/**"
      - "Cargo.toml"
      - "Cargo.lock"
      - "rust-toolchain.toml"
      - "rustfmt.toml"

# Cancel jobs when the PR is updated
concurrency:
  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
  cancel-in-progress: true

env:
  RUST_LOG: info
  RUST_BACKTRACE: 1
  RUSTUP_WINDOWS_PATH_ADD_BIN: 1

jobs:
  lint:
    name: Lint project
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        include:
          # we have to also lint on windows because sometimes lints appear only on windows.
          # this particularly occurs when code is conditionally compiled depending on the target os.
          - os: depot-windows-2022
          - os: depot-ubuntu-24.04-arm-16
    steps:
      - name: Checkout PR Branch
        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
      - name: Install toolchain
        uses: moonrepo/setup-rust@abb2d32350334249b178c401e5ec5836e0cd88d3 # v1.3.0
        with:
          components: clippy
          cache-base: main
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      - name: Run clippy
        run: cargo lint

  check-dependencies:
    name: Check Dependencies
    runs-on: depot-ubuntu-24.04-arm
    steps:
      - name: Checkout PR Branch
        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
      - name: Install toolchain
        uses: moonrepo/setup-rust@abb2d32350334249b178c401e5ec5836e0cd88d3 # v1.3.0
        with:
          channel: nightly
          bins: cargo-udeps
          cache: false
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      - name: Detect unused dependencies using udeps
        run: cargo +nightly udeps --all-targets

  test:
    name: Test
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        include:
          - os: depot-windows-2022-16
          - os: depot-ubuntu-24.04-arm-16
    steps:
      - name: Checkout PR branch
        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
      - name: Install toolchain
        uses: moonrepo/setup-rust@abb2d32350334249b178c401e5ec5836e0cd88d3 # v1.3.0
        with:
          cache-base: main
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      - name: Run tests
        run: cargo test --workspace --features=js_plugin

  e2e-tests:
    name: End-to-end tests
    runs-on: depot-ubuntu-24.04-arm-16
    steps:
      - name: Checkout PR branch
        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
      - name: Install toolchain
        uses: moonrepo/setup-rust@abb2d32350334249b178c401e5ec5836e0cd88d3 # v1.3.0
        with:
          cache-base: main
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      - name: Build Biome debug binary
        run: cargo build --bin biome
      - name: Run tests
        run: |
          cd e2e-tests
          sh test-all.sh

  documentation:
    name: Documentation
    runs-on: depot-ubuntu-24.04-arm
    steps:
      - name: Checkout PR branch
        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
      - name: Install toolchain
        uses: moonrepo/setup-rust@abb2d32350334249b178c401e5ec5836e0cd88d3 # v1.3.0
        with:
          cache-base: main
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      - name: Run doc command
        run: cargo documentation
pull_request_js .github/workflows/pull_request_js.yml
Triggers
merge_group, pull_request
Runs on
depot-ubuntu-24.04-arm
Jobs
format-js
Actions
pnpm/action-setup
Commands
  • pnpm i pnpm run ci
View raw YAML
# Jobs run on pull request in js folders
name: Pull request JS
on:
  merge_group:
  pull_request:
    branches:
      - main
    paths: # Only run when changes are made to js code
      - 'packages/@biomejs/**'
      - 'packages/aria-data/**'
      - 'packages/tailwindcss-config-analyzer/**'
      - 'package.json'
      - 'pnpm-lock.yaml'

# Cancel jobs when the PR is updated
concurrency:
  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
  cancel-in-progress: true

env:
  RUST_LOG: info
  RUST_BACKTRACE: 1

jobs:
  format-js:
    name: Check JS Files
    runs-on: depot-ubuntu-24.04-arm
    steps:
      - name: Checkout repository
        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
      - name: Cache pnpm modules
        uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
        with:
          path: ~/.pnpm-store
          key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
          restore-keys: |
            ${{ runner.os }}-
      - uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v4.4.0
      - name: Run Biome CI check
        run: |
          pnpm i
          pnpm run ci
pull_request_markdown .github/workflows/pull_request_markdown.yml
Triggers
merge_group, pull_request
Runs on
depot-ubuntu-24.04-arm
Jobs
lint
Actions
DavidAnson/markdownlint-cli2-action
View raw YAML
name: Pull request Markdown
on:
  merge_group:
  pull_request:
    branches:
      - main
      - next
    paths:
      - "**/*.md"

jobs:
  lint:
    runs-on: depot-ubuntu-24.04-arm
    steps:
      - uses: actions/checkout@0c366fd6a839edf440554fa01a7085ccba70ac98
      - uses: DavidAnson/markdownlint-cli2-action@154744fb7a91a75fa504780dd1118f262f1f00b5
        with:
          globs: |
            **/*.md
            #ROME_CHANGELOG.md
            #GOVERNANCE.md
            #**/node_modules
            #xtask/coverage
            #target
            #crates/biome_markdown_parser/tests
            #crates/biome_markdown_formatter/tests
            #crates/biome_js_formatter/report*.md
pull_request_node .github/workflows/pull_request_node.yml
Triggers
merge_group, pull_request
Runs on
depot-ubuntu-24.04-arm-16
Jobs
test-node-api
Actions
moonrepo/setup-rust, pnpm/action-setup, extractions/setup-just
Commands
  • cargo build -p biome_cli --release
  • pnpm --filter @biomejs/backend-jsonrpc i pnpm --filter @biomejs/backend-jsonrpc run build pnpm --filter @biomejs/js-api run build:wasm-bundler-dev pnpm --filter @biomejs/js-api run build:wasm-node-dev pnpm --filter @biomejs/js-api run build:wasm-web-dev pnpm --filter @biomejs/js-api i pnpm --filter @biomejs/js-api run build
  • pnpm --filter @biomejs/backend-jsonrpc run test:ci pnpm --filter @biomejs/js-api run test:ci
View raw YAML
# Jobs run on pull request for Node.js APIs
name: Pull request Node.js
on:
  merge_group:
  pull_request:
    branches:
      - main
    paths: # Only run when changes are made to Rust crates or Node.js packages
      - "crates/**"
      - "packages/@biomejs/**"
      - "Cargo.toml"
      - "Cargo.lock"
      - "package.json"
      - "pnpm-lock.yaml"
      - "rust-toolchain.toml"
      - ".github/workflows/pull_request_node.yml"

# Cancel jobs when the PR is updated
concurrency:
  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
  cancel-in-progress: true

env:
  RUST_LOG: info
  RUST_BACKTRACE: 1

jobs:
  test-node-api:
    name: Test Node.js API
    runs-on: depot-ubuntu-24.04-arm-16
    steps:
      - name: Checkout PR branch
        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
      - name: Install toolchain
        uses: moonrepo/setup-rust@abb2d32350334249b178c401e5ec5836e0cd88d3 # v1.3.0
        with:
          cache-target: release
          cache-base: main
          bins: wasm-bindgen-cli@0.2.106, wasm-opt
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      - name: Build main binary
        run: cargo build -p biome_cli --release
      - name: Install Node.js
        uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
        with:
          node-version: 24.14.0
      - name: Cache pnpm modules
        uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
        with:
          path: ~/.pnpm-store
          key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
          restore-keys: |
            ${{ runner.os }}-
      - uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v4.4.0

      - name: Install just
        uses: extractions/setup-just@f8a3cce218d9f83db3a2ecd90e41ac3de6cdfd9b # v3.1.0

      - name: Build TypeScript code
        # We use the `*-dev` builds below because release builds take very long.
        # The main difference is that release builds run `wasm-opt`, which is
        # responsible for the majority of the time of these builds, but regular
        # PRs of ours don't influence that process anyway, so it feels like a
        # waste of time to run on every PR. It does mean that if `wasm-opt`
        # breaks something, we'll discover it later, possibly when creating a
        # prerelease.
        run: |
          pnpm --filter @biomejs/backend-jsonrpc i
          pnpm --filter @biomejs/backend-jsonrpc run build
          pnpm --filter @biomejs/js-api run build:wasm-bundler-dev
          pnpm --filter @biomejs/js-api run build:wasm-node-dev
          pnpm --filter @biomejs/js-api run build:wasm-web-dev
          pnpm --filter @biomejs/js-api i
          pnpm --filter @biomejs/js-api run build
      - name: Run JS tests
        run: |
          pnpm --filter @biomejs/backend-jsonrpc run test:ci
          pnpm --filter @biomejs/js-api run test:ci
pull_request_title_lint perms .github/workflows/pull_request_title_lint.yaml
Triggers
pull_request_target
Runs on
depot-ubuntu-24.04-arm-small
Jobs
main
Actions
amannn/action-semantic-pull-request
View raw YAML
name: "Lint Pull Request Titles"

on:
  pull_request_target:
    types:
      - opened
      - edited
      - synchronize

permissions:
  pull-requests: read

jobs:
  main:
    name: Validate PR title
    runs-on: depot-ubuntu-24.04-arm-small
    steps:
      - uses: amannn/action-semantic-pull-request@48f256284bd46cdaab1048c3721360e808335d50 # v6.1.1
        id: lint_pr_title
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          # Configure which types are allowed (newline-delimited).
          # ref: CONTRIBUTING.md
          types: |
            build
            chore
            ci
            docs
            feat
            fix
            perf
            refactor
            release
            revert
            test
          # Configure that a scope must always be provided.
          requireScope: false
          # Configure which scopes are disallowed in PR titles.
          # These are regex patterns auto-wrapped in `^ $`.
          #
          # We disable the following scopes:
          # - `release` because we have the `release` type
          # - UPPERCASE titles because we promote the use of lowercase
          disallowScopes: |
            release
            [A-Z_-]+
          # Configure additional validation for the subject based on a regex.
          # Ensures that the subject doesn't start with an uppercase character.
          subjectPattern: ^[^A-Z].*$
          # If `subjectPattern` is configured, you can use this property to override
          # the default error message that is shown when the pattern doesn't match.
          # The variables `subject` and `title` can be used within the message.
          subjectPatternError: |
            The subject "{subject}" found in the pull request title "{title}"
            didn't match the configured pattern.
            Please ensure that the subject doesn't start with an uppercase character.
            The scope should not be in UPPERCASE.
release matrix perms .github/workflows/release.yml
Triggers
push
Runs on
depot-ubuntu-24.04-arm-small, depot-ubuntu-24.04-arm-small, ${{ matrix.os }}, ${{ matrix.os }}, depot-ubuntu-24.04-arm-16, depot-ubuntu-24.04-arm-16, ubuntu-24.04, depot-ubuntu-24.04-arm-small, ubuntu-24.04
Jobs
changesets, version, build-binaries, build-binaries-gnu, build-wasm, build-js-api, publish-cli, publish-wasm-web, publish-js-api
Matrix
include, include.code-target, include.just-recipe, include.os, include.target→ aarch64-apple-darwin, aarch64-pc-windows-msvc, aarch64-unknown-linux-gnu, aarch64-unknown-linux-musl, build-wasm-bundler, build-wasm-node, build-wasm-web, darwin-arm64, darwin-x64, depot-macos-14, depot-ubuntu-24.04, depot-ubuntu-24.04-16, depot-ubuntu-24.04-arm-16, depot-ubuntu-24.04-arm-4, depot-windows-2022-16, linux-arm64, linux-arm64-musl, linux-x64, linux-x64-musl, wasm-bundler, wasm-nodejs, wasm-web, win32-arm64, win32-x64, x86_64-apple-darwin, x86_64-pc-windows-msvc, x86_64-unknown-linux-gnu, x86_64-unknown-linux-musl
Actions
changesets/action, taiki-e/install-action, actions/attest-build-provenance, actions/attest-build-provenance, extractions/setup-just, moonrepo/setup-rust, extractions/setup-just, moonrepo/setup-rust, pnpm/action-setup, softprops/action-gh-release, peter-evans/repository-dispatch, peter-evans/repository-dispatch, softprops/action-gh-release
Commands
  • npm install -g corepack corepack enable pnpm --version
  • pnpm install --frozen-lockfile
  • sudo apt-get update sudo apt-get install -y ripgrep pnpm exec changeset status --output="changeset_status.json" NEW_VERSION=$(jq -r '.releases[] | select(.name=="@biomejs/biome") | .newVersion' changeset_status.json) rm changeset_status.json if [ -z "$NEW_VERSION" ]; then echo "No new @biomejs/biome version detected; skipping rule version metadata update." exit 0 fi scripts/update-next-version.sh --replace "$NEW_VERSION"
  • git stash push -u -m __automated-changes
  • version=$(node --experimental-strip-types scripts/version-check.ts packages/@biomejs/biome/package.json) echo "version=$version" >> $GITHUB_OUTPUT
  • version=$(node --experimental-strip-types scripts/version-check.ts packages/@biomejs/js-api/package.json) echo "version=$version" >> $GITHUB_OUTPUT
  • rustup target add ${{ matrix.target }}
  • sudo apt-get update sudo apt-get install -y musl-tools
View raw YAML
name: Release

on:
  push:
    branches:
      - main

concurrency: ${{ github.workflow }}-${{ github.ref }}

permissions:
  actions: write
  attestations: write
  contents: write
  id-token: write
  pull-requests: write

env:
  CARGO_TERM_COLOR: always
  BIOME_WEBSITE_REPO: biomejs/website
  BIOME_DOCKER_REPO: biomejs/docker
  BIOME_RELEASE_CLI_EVENT: biome-release-cli-event

jobs:
  changesets:
    name: Release
    outputs:
      hasChangesets: ${{ steps.changesets-action.outputs.hasChangesets }}
    runs-on: depot-ubuntu-24.04-arm-small
    steps:
      - name: Checkout Repo
        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

      - name: Install Node.js
        uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
        with:
          node-version: 24.14.0

      - name: Install pnpm
        run: |
          npm install -g corepack
          corepack enable
          pnpm --version

      - name: Install dependencies
        run: pnpm install --frozen-lockfile

      - name: Update rule version metadata
        run: |
          sudo apt-get update
          sudo apt-get install -y ripgrep
          pnpm exec changeset status --output="changeset_status.json"
          NEW_VERSION=$(jq -r '.releases[] | select(.name=="@biomejs/biome") | .newVersion' changeset_status.json)
          rm changeset_status.json
          if [ -z "$NEW_VERSION" ]; then
            echo "No new @biomejs/biome version detected; skipping rule version metadata update."
            exit 0
          fi
          scripts/update-next-version.sh --replace "$NEW_VERSION"

      # The changeset action does a hard reset, so we need to save
      # the changes in a stash so they can be popped later in the `version` command
      - name: Stash changes
        run: git stash push -u -m __automated-changes

      - name: Create Release Pull Request
        id: changesets-action
        uses: changesets/action@6a0a831ff30acef54f2c6aa1cbbc1096b066edaf # v1.7.0
        with:
          version: pnpm run version
          commit: "ci: release"
          title: "ci: release"
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

  # Retrieve version of `@biomejs/biome` and `@biomejs/js-api`
  version:
    runs-on: depot-ubuntu-24.04-arm-small
    needs: changesets
    if: needs.changesets.outputs.hasChangesets == 'false'
    outputs:
      cli-version: ${{ steps.cli-version-changed.outputs.version }}
      js-api-version: ${{ steps.js-api-version-changed.outputs.version }}

    steps:
      - name: Checkout Repo
        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

      - name: Install Node.js
        uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
        with:
          node-version: 24.14.0

      - name: Check CLI version changes
        id: cli-version-changed
        run: |
          version=$(node --experimental-strip-types scripts/version-check.ts packages/@biomejs/biome/package.json)
          echo "version=$version" >> $GITHUB_OUTPUT

      - name: Check JS API version changes
        id: js-api-version-changed
        run: |
          version=$(node --experimental-strip-types scripts/version-check.ts packages/@biomejs/js-api/package.json)
          echo "version=$version" >> $GITHUB_OUTPUT

  # Building jobs

  build-binaries:
    needs: version
    if: needs.version.outputs.cli-version
    outputs:
      version: ${{ needs.version.outputs.cli-version }}
    strategy:
      matrix:
        include:
          - os: depot-windows-2022-16
            target: x86_64-pc-windows-msvc
            code-target: win32-x64
          - os: depot-windows-2022-16
            target: aarch64-pc-windows-msvc
            code-target: win32-arm64
          - os: depot-ubuntu-24.04-16
            target: x86_64-unknown-linux-musl
            code-target: linux-x64-musl
          - os: depot-ubuntu-24.04-arm-16
            target: aarch64-unknown-linux-musl
            code-target: linux-arm64-musl
          - os: depot-macos-14
            target: x86_64-apple-darwin
            code-target: darwin-x64
          - os: depot-macos-14
            target: aarch64-apple-darwin
            code-target: darwin-arm64

    name: Package ${{ matrix.code-target }}
    runs-on: ${{ matrix.os }}

    steps:
      - name: Checkout repository
        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

      - name: Install Rust toolchain
        run: rustup target add ${{ matrix.target }}

      - name: Install musl toolchain
        if: matrix.code-target == 'linux-x64-musl' || matrix.code-target == 'linux-arm64-musl'
        run: |
          sudo apt-get update
          sudo apt-get install -y musl-tools

      - name: Install cargo-audit
        uses: taiki-e/install-action@06203676c62f0d3c765be3f2fcfbebbcb02d09f5 # v2.69.6
        if: matrix.code-target == 'linux-x64-musl'
        with:
          tool: cargo-audit

      - name: Audit crates.io dependencies
        if: matrix.code-target == 'linux-x64-musl'
        run: cargo audit

      # Build the CLI binary
      - name: Build binaries
        run: cargo build -p biome_cli --release --target ${{ matrix.target }}
        env:
          # Strip all debug symbols from the resulting binaries
          RUSTFLAGS: "-C strip=symbols -C codegen-units=1"
          # Inline the version of the npm package in the CLI binary
          BIOME_VERSION: ${{ needs.version.outputs.cli-version }}

      # Copy the CLI binary and rename it to include the name of the target platform
      - name: Copy CLI binary
        if: matrix.os == 'depot-windows-2022-16'
        run: |
          mkdir dist
          cp target/${{ matrix.target }}/release/biome.exe ./dist/biome-${{ matrix.code-target }}.exe
      - name: Copy CLI binary
        if: matrix.os != 'depot-windows-2022-16'
        run: |
          mkdir dist
          cp target/${{ matrix.target }}/release/biome ./dist/biome-${{ matrix.code-target }}

      - name: Attest build provenance
        uses: actions/attest-build-provenance@96278af6caaf10aea03fd8d33a09a777ca52d62f # v3.2.0
        with:
          subject-path: ./dist/biome-*

      # Upload the CLI binary as a build artifact
      - name: Upload CLI artifact
        uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
        with:
          name: cli-${{ matrix.target }}
          path: ./dist/biome-*
          if-no-files-found: error

  # Build GNU/Linux binaries in Docker, using Debian 11 (bullseye), to support older versions of glibc.
  build-binaries-gnu:
    needs: version
    if: needs.version.outputs.cli-version
    env:
      RUST_BACKTRACE: 1
    strategy:
      matrix:
        include:
          - os: depot-ubuntu-24.04
            target: x86_64-unknown-linux-gnu
            code-target: linux-x64
          - os: depot-ubuntu-24.04-arm-4
            target: aarch64-unknown-linux-gnu
            code-target: linux-arm64

    name: Package ${{ matrix.code-target }}
    runs-on: ${{ matrix.os }}
    container:
      image: rust:1.94.0-bullseye@sha256:16950191527a4cb9e0762d9d48b705a6315158e4035e64f7a93ce8656a1b053c

    steps:
      - name: Checkout repository
        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

      - name: Set jemalloc page size for linux-arm64
        if: matrix.code-target == 'linux-arm64'
        run: |
          echo "JEMALLOC_SYS_WITH_LG_PAGE=16" >> $GITHUB_ENV

      # Build the CLI binary
      - name: Build binaries
        run: cargo build -p biome_cli --release --target ${{ matrix.target }}
        env:
          # Strip all debug symbols from the resulting binaries
          RUSTFLAGS: "-C strip=symbols -C codegen-units=1"
          # Inline the version of the npm package in the CLI binary
          BIOME_VERSION: ${{ needs.version.outputs.cli-version }}

      # Copy the CLI binary and rename it to include the name of the target platform
      - name: Copy CLI binary
        run: |
          mkdir dist
          cp target/${{ matrix.target }}/release/biome ./dist/biome-${{ matrix.code-target }}

      - name: Attest build provenance
        uses: actions/attest-build-provenance@96278af6caaf10aea03fd8d33a09a777ca52d62f # v3.2.0
        with:
          subject-path: ./dist/biome-*

      # Upload the CLI binary as a build artifact
      - name: Upload CLI artifact
        uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
        with:
          name: cli-${{ matrix.target }}
          path: ./dist/biome-*
          if-no-files-found: error

  build-wasm:
    name: Build WASM
    runs-on: depot-ubuntu-24.04-arm-16
    needs: version
    if: needs.version.outputs.cli-version
    strategy:
      matrix:
        include:
          - target: wasm-bundler
            just-recipe: build-wasm-bundler
          - target: wasm-nodejs
            just-recipe: build-wasm-node
          - target: wasm-web
            just-recipe: build-wasm-web
    steps:
      - name: Checkout repository
        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

      - name: Install just
        uses: extractions/setup-just@f8a3cce218d9f83db3a2ecd90e41ac3de6cdfd9b # v3.1.0

      - name: Install toolchain
        uses: moonrepo/setup-rust@abb2d32350334249b178c401e5ec5836e0cd88d3 # v1.3.0
        with:
          bins: wasm-bindgen-cli@0.2.106, wasm-opt
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

      - name: Build WASM module ${{ matrix.target }}
        run: just ${{ matrix.just-recipe }}

      - name: Upload WASM artifact
        uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
        with:
          name: ${{ matrix.target }}-artefact
          # Important: the paths are specified like this so the uploaded artifacts
          # can be directly placed into the `packages/@biomejs` folder when downloaded
          path: |
            ./packages/@biomejs/wasm-bundler
            ./packages/@biomejs/wasm-nodejs
            ./packages/@biomejs/wasm-web
          if-no-files-found: error

  build-js-api:
    name: Package JavaScript APIs
    runs-on: depot-ubuntu-24.04-arm-16
    needs: version
    if: needs.version.outputs.js-api-version
    outputs:
      version: ${{ needs.version.outputs.js-api-version }}
    steps:
      - name: Checkout repository
        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

      - name: Install Node.js
        uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
        with:
          node-version: 24.14.0

      - name: Install just
        uses: extractions/setup-just@f8a3cce218d9f83db3a2ecd90e41ac3de6cdfd9b # v3.1.0

      - name: Install toolchain
        uses: moonrepo/setup-rust@abb2d32350334249b178c401e5ec5836e0cd88d3 # v1.3.0
        with:
          bins: wasm-bindgen-cli@0.2.106, wasm-opt
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

      - name: Cache pnpm modules
        uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
        with:
          path: ~/.pnpm-store
          key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
          restore-keys: |
            ${{ runner.os }}-
      - uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v4.4.0
      - name: Compile backends
        run: |
          pnpm --filter @biomejs/js-api run build:wasm-bundler
          pnpm --filter @biomejs/js-api run build:wasm-node
          pnpm --filter @biomejs/js-api run build:wasm-web
          pnpm --filter @biomejs/backend-jsonrpc i
          pnpm --filter @biomejs/backend-jsonrpc run build

      - name: Build package
        run: |
          pnpm --filter @biomejs/js-api i
          pnpm --filter @biomejs/js-api run build

      - name: Upload JS API artifact
        uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
        with:
          name: js-api
          path: |
            ./packages/@biomejs/js-api/dist
          if-no-files-found: error
  # Publishing jobs

  publish-cli:
    name: Publish CLI
    runs-on: ubuntu-24.04 # Must be a GitHub hosted runner for provenance
    needs:
      - build-binaries
      - build-binaries-gnu
      - build-wasm
    if: needs.build-binaries.outputs.version
    outputs:
      version: ${{ needs.build-binaries.outputs.version }}
    environment: npm-publish
    permissions:
      contents: write
      id-token: write
    steps:
      - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

      - name: Download CLI artifacts
        uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
        with:
          pattern: cli-*
          merge-multiple: true
      - name: Download WASM artifacts
        uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
        with:
          pattern: wasm-*
          merge-multiple: true
          path: packages/@biomejs
      - name: Install Node.js
        uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
        with:
          node-version: 24.14.0
          registry-url: "https://registry.npmjs.org"

      - name: Install pnpm
        run: |
          npm install -g corepack
          corepack enable
          pnpm --version

      - name: Install dependencies
        run: pnpm install --frozen-lockfile

      - name: Generate npm packages
        run: node packages/@biomejs/biome/scripts/generate-packages.mjs

      - name: Publish npm packages as latest
        run: for package in packages/@biomejs/*; do if [ $package != "packages/@biomejs/js-api" ] && [ $package != "packages/@biomejs/plugin-api" ]; then npm publish $package  --tag latest --access public; fi; done

      - name: Publish release for @biomejs/biome
        run: |
          bash scripts/print-changelog.sh ${{ needs.build-binaries.outputs.version }} >| ${{ github.workspace }}/RELEASE_NOTES

      - name: Create GitHub @biomejs/biome release and tag
        uses: softprops/action-gh-release@153bb8e04406b158c6c84fc1615b65b24149a1fe # v2.6.1
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          name: |
            Biome CLI v${{ needs.build-binaries.outputs.version }}
          tag_name: |
            @biomejs/biome@${{ needs.build-binaries.outputs.version }}
          draft: false
          body_path: ${{ github.workspace }}/RELEASE_NOTES
          files: |
            biome-*
          fail_on_unmatched_files: true
          generate_release_notes: true

      - name: Generate docker images
        uses: peter-evans/repository-dispatch@28959ce8df70de7be546dd1250a005dd32156697 # v4.0.1
        with:
          token: ${{ secrets.BIOME_REPOSITORY_DISPATCH }}
          repository: ${{ env.BIOME_DOCKER_REPO }}
          event-type: ${{ env.BIOME_RELEASE_CLI_EVENT }}


  # Publish wasm-web on pkg-pr-new and dispatch event to website repo.
  # This job is intentionally not required by any other job so it cannot block the release.
  publish-wasm-web:
    name: Publish wasm-web preview
    runs-on: depot-ubuntu-24.04-arm-small
    needs:
      - build-wasm
      - publish-cli
    # Run after the release is published; never block the release pipeline.
    if: always() && needs.build-wasm.result == 'success' && needs.publish-cli.result == 'success'
    continue-on-error: true
    steps:
      - name: Checkout repository
        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

      - name: Download wasm-web artifact
        uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
        with:
          name: wasm-web-artefact
          path: packages/@biomejs

      - name: Install pnpm
        run: npm i -g --force corepack && corepack enable

      - name: Setup node
        uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
        with:
          node-version: 24.14.0
          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.sha }}'

      - name: Publish on pkg-pr-new
        working-directory: packages/@biomejs/wasm-web
        run: pnpx pkg-pr-new publish

      - name: Dispatch event to website repo
        uses: peter-evans/repository-dispatch@28959ce8df70de7be546dd1250a005dd32156697 # v4.0.1
        with:
          token: ${{ secrets.BIOME_REPOSITORY_DISPATCH }}
          repository: ${{ env.BIOME_WEBSITE_REPO }}
          event-type: ${{ env.BIOME_RELEASE_CLI_EVENT }}
          client-payload: |
            { "sha": "${{ github.sha }}", "tag": "@biomejs/biome@${{ needs.publish-cli.outputs.version }}", "version": "${{ needs.publish-cli.outputs.version }}" }

  publish-js-api:
    name: Publish JS API
    runs-on: ubuntu-24.04 # Must be a GitHub hosted runner for provenance
    needs: build-js-api
    if: needs.build-js-api.outputs.version
    environment: npm-publish
    permissions:
      contents: write
      id-token: write
    steps:
      - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

      - name: Download JS API artifacts
        uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
        with:
          name: js-api
          path: packages/@biomejs/js-api/dist

      - name: Install Node.js
        uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
        with:
          node-version: 24.14.0
          registry-url: "https://registry.npmjs.org"

      - name: Install pnpm
        run: |
          npm install -g corepack
          corepack enable
          pnpm --version

      - name: Install dependencies
        run: pnpm install --frozen-lockfile

      - name: Publish npm package as latest
        run: pnpm publish packages/@biomejs/js-api --no-git-checks --tag latest --access public

      - name: Publish release for @biomejs/js-api
        run: |
          bash scripts/print-changelog.sh ${{ needs.build-js-api.outputs.version }} packages/@biomejs/js-api/CHANGELOG.md  >| ${{ github.workspace }}/JS_RELEASE_NOTES

      - name: Create GitHub @biomejs/js-api release and tag
        uses: softprops/action-gh-release@153bb8e04406b158c6c84fc1615b65b24149a1fe # v2.6.1
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          name: |
            JavaScript APIs v${{ needs.build-js-api.outputs.version }}
          tag_name: |
            @biomejs/js-api@${{ needs.build-js-api.outputs.version }}
          draft: false
          body_path: ${{ github.workspace }}/JS_RELEASE_NOTES
          fail_on_unmatched_files: true
          generate_release_notes: true
          make_latest: false # Keep the CLI release as latest
release_cli matrix .github/workflows/release_cli.yml
Triggers
workflow_dispatch
Runs on
depot-ubuntu-24.04-arm-small, ${{ matrix.os }}, ${{ matrix.os }}, depot-ubuntu-24.04-arm-16, ubuntu-24.04
Jobs
check, build, build-gnu, build-wasm, publish
Matrix
include, include.code-target, include.os, include.target→ aarch64-apple-darwin, aarch64-pc-windows-msvc, aarch64-unknown-linux-gnu, aarch64-unknown-linux-musl, darwin-arm64, darwin-x64, depot-macos-14, depot-ubuntu-24.04-16, depot-ubuntu-24.04-arm-16, depot-windows-2022-16, linux-arm64, linux-arm64-musl, linux-x64, linux-x64-musl, win32-arm64, win32-x64, x86_64-apple-darwin, x86_64-pc-windows-msvc, x86_64-unknown-linux-gnu, x86_64-unknown-linux-musl
Actions
EndBug/version-check, taiki-e/install-action, actions/attest-build-provenance, actions/attest-build-provenance, softprops/action-gh-release
Commands
  • echo "nightly=true" >> $GITHUB_ENV
  • echo "Version change found! New version: ${{ steps.version.outputs.version }} (${{ steps.version.outputs.version_type }})" echo "version=${{ steps.version.outputs.version }}" >> $GITHUB_ENV
  • echo "prerelease=true" >> $GITHUB_ENV echo "version=$(node packages/@biomejs/biome/scripts/update-nightly-version.mjs)" >> $GITHUB_ENV
  • rustup target add ${{ matrix.target }}
  • sudo apt-get update sudo apt-get install -y musl-tools
  • cargo audit
  • cargo build -p biome_cli --release --target ${{ matrix.target }}
  • mkdir dist cp target/${{ matrix.target }}/release/biome.exe ./dist/biome-${{ matrix.code-target }}.exe
View raw YAML
# To keep it as emergency workflow until preview, beta and changesets releases are stable
name: Release CLI
on:
  workflow_dispatch:

env:
  CARGO_TERM_COLOR: always

jobs:
  check:
    name: Check version
    runs-on: depot-ubuntu-24.04-arm-small
    outputs:
      version: ${{ env.version }}
    steps:
      - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

      - name: Check nightly status
        id: nightly
        if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
        run: echo "nightly=true" >> $GITHUB_ENV

      - name: Check version changes
        uses: EndBug/version-check@5102328418c0130d66ca712d755c303e93368ce2 # v2.1.7
        id: version
        with:
          diff-search: true
          file-name: packages/@biomejs/biome/package.json

      - name: Set version name
        if: steps.version.outputs.changed == 'true'
        run: |
          echo "Version change found! New version: ${{ steps.version.outputs.version }} (${{ steps.version.outputs.version_type }})"
          echo "version=${{ steps.version.outputs.version }}" >> $GITHUB_ENV

      - name: Set prerelease status
        if: env.nightly == 'true'
        run: |
          echo "prerelease=true" >> $GITHUB_ENV
          echo "version=$(node packages/@biomejs/biome/scripts/update-nightly-version.mjs)" >> $GITHUB_ENV

  build:
    strategy:
      matrix:
        include:
          - os: depot-windows-2022-16
            target: x86_64-pc-windows-msvc
            code-target: win32-x64
          - os: depot-windows-2022-16
            target: aarch64-pc-windows-msvc
            code-target: win32-arm64
          - os: depot-ubuntu-24.04-16
            target: x86_64-unknown-linux-musl
            code-target: linux-x64-musl
          - os: depot-ubuntu-24.04-arm-16
            target: aarch64-unknown-linux-musl
            code-target: linux-arm64-musl
          - os: depot-macos-14
            target: x86_64-apple-darwin
            code-target: darwin-x64
          - os: depot-macos-14
            target: aarch64-apple-darwin
            code-target: darwin-arm64

    name: Package ${{ matrix.code-target }}
    runs-on: ${{ matrix.os }}
    permissions:
      contents: read
      id-token: write
      attestations: write

    needs: check
    if: needs.check.outputs.version_changed == 'true' || needs.check.outputs.nightly == 'true'
    env:
      version: ${{ needs.check.outputs.version }}
    outputs:
      version: ${{ env.version }}
      prerelease: ${{ needs.check.outputs.prerelease }}

    steps:
      - name: Checkout repository
        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

      - name: Install Rust toolchain
        run: rustup target add ${{ matrix.target }}

      - name: Install musl toolchain
        if: matrix.code-target == 'linux-x64-musl' || matrix.code-target == 'linux-arm64-musl'
        run: |
          sudo apt-get update
          sudo apt-get install -y musl-tools

      - name: Install cargo-audit
        uses: taiki-e/install-action@06203676c62f0d3c765be3f2fcfbebbcb02d09f5 # v2.69.6
        if: matrix.code-target == 'linux-x64-musl'
        with:
          tool: cargo-audit

      - name: Audit crates.io dependencies
        if: matrix.code-target == 'linux-x64-musl'
        run: cargo audit

      # Build the CLI binary
      - name: Build binaries
        run: cargo build -p biome_cli --release --target ${{ matrix.target }}
        env:
          # Strip all debug symbols from the resulting binaries
          RUSTFLAGS: "-C strip=symbols -C codegen-units=1"
          # Inline the version of the npm package in the CLI binary
          BIOME_VERSION: ${{ env.version }}

      # Copy the CLI binary and rename it to include the name of the target platform
      - name: Copy CLI binary
        if: matrix.os == 'depot-windows-2022-16'
        run: |
          mkdir dist
          cp target/${{ matrix.target }}/release/biome.exe ./dist/biome-${{ matrix.code-target }}.exe
      - name: Copy CLI binary
        if: matrix.os != 'depot-windows-2022-16'
        run: |
          mkdir dist
          cp target/${{ matrix.target }}/release/biome ./dist/biome-${{ matrix.code-target }}

      - name: Attest build provenance
        uses: actions/attest-build-provenance@96278af6caaf10aea03fd8d33a09a777ca52d62f # v3.2.0
        with:
          subject-path: ./dist/biome-*

      # Upload the CLI binary as a build artifact
      - name: Upload CLI artifact
        uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
        with:
          name: cli-${{ matrix.target }}
          path: ./dist/biome-*
          if-no-files-found: error

  # Build GNU/Linux binaries in Docker, using Debian 11 (bullseye), to support older versions of glibc.
  build-gnu:
    strategy:
      matrix:
        include:
          - os: depot-ubuntu-24.04-16
            target: x86_64-unknown-linux-gnu
            code-target: linux-x64
          - os: depot-ubuntu-24.04-arm-16
            target: aarch64-unknown-linux-gnu
            code-target: linux-arm64

    name: Package ${{ matrix.code-target }}
    runs-on: ${{ matrix.os }}
    permissions:
      contents: read
      id-token: write
      attestations: write

    needs: check
    if: needs.check.outputs.version_changed == 'true' || needs.check.outputs.nightly == 'true'
    env:
      version: ${{ needs.check.outputs.version }}
    outputs:
      version: ${{ env.version }}
      prerelease: ${{ needs.check.outputs.prerelease }}

    steps:
      - name: Checkout repository
        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

      - name: Set jemalloc page size for linux-arm64
        if: matrix.code-target == 'linux-arm64'
        run: |
          echo "JEMALLOC_SYS_WITH_LG_PAGE=16" >> $GITHUB_ENV

      # Build the CLI binary
      - name: Build binaries
        run: cargo build -p biome_cli --release --target ${{ matrix.target }}
        env:
          # Strip all debug symbols from the resulting binaries
          RUSTFLAGS: "-C strip=symbols -C codegen-units=1"
          # Inline the version of the npm package in the CLI binary
          BIOME_VERSION: ${{ env.version }}

      # Copy the CLI binary and rename it to include the name of the target platform
      - name: Copy CLI binary
        run: |
          mkdir dist
          cp target/${{ matrix.target }}/release/biome ./dist/biome-${{ matrix.code-target }}

      - name: Attest build provenance
        uses: actions/attest-build-provenance@96278af6caaf10aea03fd8d33a09a777ca52d62f # v3.2.0
        with:
          subject-path: ./dist/biome-*

      # Upload the CLI binary as a build artifact
      - name: Upload CLI artifact
        uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
        with:
          name: cli-${{ matrix.target }}
          path: ./dist/biome-*
          if-no-files-found: error

  build-wasm:
    name: Build WASM
    runs-on: depot-ubuntu-24.04-arm-16
    needs: check
    steps:
      - name: Checkout repository
        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

      - name: Install wasm-pack
        run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh

      - name: Build WASM module for bundlers
        run: wasm-pack build --out-dir ../../packages/@biomejs/wasm-bundler --target bundler --release --scope biomejs crates/biome_wasm
      - name: Build WASM module for node.js
        run: wasm-pack build --out-dir ../../packages/@biomejs/wasm-nodejs --target nodejs --release --scope biomejs crates/biome_wasm
      - name: Build WASM module for the web
        run: wasm-pack build --out-dir ../../packages/@biomejs/wasm-web --target web --release --scope biomejs crates/biome_wasm

      - name: Upload WASM artifact
        uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
        with:
          name: wasm-${{ matrix.target }}
          path: |
            ./packages/@biomejs/wasm-bundler
            ./packages/@biomejs/wasm-nodejs
            ./packages/@biomejs/wasm-web
          if-no-files-found: error

  publish:
    name: Publish
    runs-on: ubuntu-24.04 # Must be a GitHub hosted runner for provenance
    needs:
      - build
      - build-gnu
      - build-wasm
    environment: npm-publish
    permissions:
      contents: write
      id-token: write
    steps:
      - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

      - name: Download CLI artifacts
        uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
        with:
          pattern: cli-*
          merge-multiple: true
      - name: Download WASM artifacts
        uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
        with:
          pattern: wasm-*
          merge-multiple: true
          path: packages/@biomejs

      - name: Install Node.js
        uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
        with:
          node-version: 24.14.0
          registry-url: 'https://registry.npmjs.org'

      - name: Set release infos
        if: needs.build.outputs.prerelease == 'true'
        run: node packages/@biomejs/biome/scripts/update-nightly-version.mjs
      - name: Generate npm packages
        run: node packages/@biomejs/biome/scripts/generate-packages.mjs

      - name: Publish npm packages as latest
        run: for package in packages/@biomejs/*; do if [ $package != "packages/@biomejs/js-api" ] && [ $package != "packages/@biomejs/plugin-api" ]; then npm publish $package --tag latest --access public; fi; done
        if: needs.build.outputs.prerelease != 'true'
      - name: Publish npm packages as nightly
        run: for package in packages/@biomejs/*; do if [ $package != "packages/@biomejs/js-api" ] && [ $package != "packages/@biomejs/plugin-api" ]; then npm publish $package --tag nightly --access public; fi; done
        if: needs.build.outputs.prerelease == 'true'

      - name: Extract changelog
        run: |
          bash scripts/print-changelog.sh ${{ needs.build.outputs.version }} >| ${{ github.workspace }}/RELEASE_NOTES
      - name: Create GitHub release and tag
        uses: softprops/action-gh-release@153bb8e04406b158c6c84fc1615b65b24149a1fe # v2.6.1
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          name: CLI v${{ needs.build.outputs.version }}
          tag_name: cli/v${{ needs.build.outputs.version }}
          draft: false
          prerelease: ${{ needs.build.outputs.prerelease == 'true' }}
          body_path: ${{ github.workspace }}/RELEASE_NOTES
          files: |
            biome-*
          fail_on_unmatched_files: true
          generate_release_notes: true
release_js_api .github/workflows/release_js_api.yml
Triggers
workflow_dispatch
Runs on
depot-ubuntu-24.04-arm-small, depot-ubuntu-24.04-arm-16, ubuntu-24.04
Jobs
check, build, publish
Actions
EndBug/version-check, pnpm/action-setup, softprops/action-gh-release
Commands
  • echo "nightly=true" >> $GITHUB_ENV
  • echo "version=${{ steps.version.outputs.version }}" >> $GITHUB_ENV
  • echo "prerelease=true" >> $GITHUB_ENV
  • echo "Version change found! New version: ${{ steps.version.outputs.version }} (${{ steps.version.outputs.version_type }})"
  • curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
  • echo "prerelease=true" >> $GITHUB_ENV node packages/@biomejs/js-api/scripts/update-nightly-version.mjs >> $GITHUB_ENV
  • echo "prerelease=false" >> $GITHUB_ENV echo "version=${{ needs.check.outputs.version }}" >> $GITHUB_ENV
  • pnpm --filter @biomejs/js-api run build:wasm-bundler pnpm --filter @biomejs/js-api run build:wasm-node pnpm --filter @biomejs/js-api run build:wasm-web pnpm --filter @biomejs/backend-jsonrpc i pnpm --filter @biomejs/backend-jsonrpc run build
View raw YAML
# To keep it as emergency workflow until preview, beta and changesets releases are stable
name: Release JavaScript API
on:
  workflow_dispatch:

jobs:
  check:
    name: Check version
    runs-on: depot-ubuntu-24.04-arm-small
    outputs:
      version: ${{ env.version }}
      prerelease: ${{ env.prerelease }}
      nightly: ${{ env.nightly }}
      version_changed: ${{ steps.version.outputs.changed }}
    steps:
      - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

      - name: Check nightly status
        id: nightly
        if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
        run: echo "nightly=true" >> $GITHUB_ENV

      - name: Check version changes
        uses: EndBug/version-check@5102328418c0130d66ca712d755c303e93368ce2 # v2.1.7
        if: env.nightly != 'true'
        id: version
        with:
          diff-search: true
          file-name: packages/@biomejs/js-api/package.json

      - name: Set version name
        run: echo "version=${{ steps.version.outputs.version }}" >> $GITHUB_ENV

      - name: Check prerelease status
        id: prerelease
        if: env.nightly == 'true'
        run: echo "prerelease=true" >> $GITHUB_ENV

      - name: Check version status
        if: steps.version.outputs.changed == 'true'
        run: 'echo "Version change found! New version: ${{ steps.version.outputs.version }} (${{ steps.version.outputs.version_type }})"'

  build:
    name: Package JavaScript APIs
    runs-on: depot-ubuntu-24.04-arm-16

    needs: check
    if: needs.check.outputs.version_changed == 'true' || needs.check.outputs.nightly == 'true'
    outputs:
      version: ${{ env.version }}
      prerelease: ${{ env.prerelease }}

    steps:
      - name: Checkout repository
        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

      - name: Install Node.js
        uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
        with:
          node-version: 24.14.0

      - name: Install wasm-pack
        run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh

      - name: Cache pnpm modules
        uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
        with:
          path: ~/.pnpm-store
          key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
          restore-keys: |
            ${{ runner.os }}-
      - uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v4.4.0

      - name: Set release infos
        if: needs.check.outputs.prerelease == 'true'
        run: |
          echo "prerelease=true" >> $GITHUB_ENV
          node packages/@biomejs/js-api/scripts/update-nightly-version.mjs >> $GITHUB_ENV
      - name: Set release infos
        if: needs.check.outputs.prerelease != 'true'
        run: |
          echo "prerelease=false" >> $GITHUB_ENV
          echo "version=${{ needs.check.outputs.version }}" >> $GITHUB_ENV

      - name: Compile backends
        run: |
          pnpm --filter @biomejs/js-api run build:wasm-bundler
          pnpm --filter @biomejs/js-api run build:wasm-node
          pnpm --filter @biomejs/js-api run build:wasm-web
          pnpm --filter @biomejs/backend-jsonrpc i
          pnpm --filter @biomejs/backend-jsonrpc run build

      - name: Build package
        run: |
          pnpm --filter @biomejs/js-api i
          pnpm --filter @biomejs/js-api run build

      - name: Upload JS API artifact
        uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
        with:
          name: js-api
          path: |
            ./packages/@biomejs/js-api/dist
          if-no-files-found: error

  publish:
    name: Publish
    runs-on: ubuntu-24.04 # Must be a GitHub hosted runner for provenance
    needs: build
    environment: npm-publish
    permissions:
      contents: write
      id-token: write
    steps:
      - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

      - name: Download package artifact
        uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
        with:
          name: js-api
          path: packages/@biomejs/js-api/dist

      - name: Install Node.js
        uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
        with:
          node-version: 24.14.0
          registry-url: 'https://registry.npmjs.org'

      - name: Set release infos
        if: needs.build.outputs.prerelease == 'true'
        run: node packages/@biomejs/js-api/scripts/update-nightly-version.mjs

      - name: Publish npm package as latest
        run: npm publish packages/@biomejs/js-api --tag latest --access public
        if: needs.build.outputs.prerelease != 'true'

      - name: Publish npm package as nightly
        run: npm publish packages/@biomejs/js-api --tag nightly --access public
        if: needs.build.outputs.prerelease == 'true'

      - name: Extract changelog
        run: |
          bash scripts/print-changelog.sh ${{ needs.build.outputs.version }} >| ${{ github.workspace }}/RELEASE_NOTES
      - name: Create GitHub release and tag
        uses: softprops/action-gh-release@153bb8e04406b158c6c84fc1615b65b24149a1fe # v2.6.1
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          name: JavaScript APIs v${{ needs.build.outputs.version }}
          tag_name: js-api/v${{ needs.build.outputs.version }}
          draft: false
          prerelease: ${{ needs.build.outputs.prerelease == 'true' }}
          body_path: ${{ github.workspace }}/RELEASE_NOTES
          generate_release_notes: true
repository_dispatch perms .github/workflows/repository_dispatch.yml
Triggers
workflow_dispatch, schedule
Runs on
depot-ubuntu-24.04-arm-16, depot-ubuntu-24.04
Jobs
build-wasm, repository-dispatch
Actions
extractions/setup-just, moonrepo/setup-rust, peter-evans/repository-dispatch
Commands
  • just build-wasm-web
  • gh extension install actions/gh-actions-cache gh actions-cache delete ${{ env.WASM_CACHE_KEY }} --confirm
  • npm i -g --force corepack && corepack enable
  • npm pkg set name='@biomejs/wasm-web' npm pkg set version='0.0.0-rev.${{ github.sha }}'
  • test -f biome_wasm_bg.wasm && echo "Found wasm artifact biome_wasm_bg.wasm"
  • pnpx pkg-pr-new publish
View raw YAML
name: Repository dispatch on main
on:
  workflow_dispatch:
  schedule:
    # This cron schedule runs the workflow at midnight (00:00) on Mondays, Wednesdays, and Fridays.
    - cron: '0 0 * * 1,3,5'

permissions:
  contents: read
  actions: write

env:
  BIOME_WEBSITE_REPO: biomejs/website
  BIOME_PUSH_ON_MAIN_EVENT_TYPE: biome-push-on-main-event
  WASM_CACHE_KEY: wasm-cache

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

jobs:
  build-wasm:
    name: Build @biomejs/wasm-web
    runs-on: depot-ubuntu-24.04-arm-16
    steps:
      - name: Checkout repository
        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

      - name: Warm up wasm cache
        id: cache-restore
        uses: actions/cache/restore@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
        with:
          path: |
            ./target
            ./packages/@biomejs/wasm-web
          key: ${{ env.WASM_CACHE_KEY }}

      - name: Install just
        uses: extractions/setup-just@f8a3cce218d9f83db3a2ecd90e41ac3de6cdfd9b # v3.1.0

      - name: Install toolchain
        uses: moonrepo/setup-rust@abb2d32350334249b178c401e5ec5836e0cd88d3 # v1.3.0
        with:
          bins: wasm-bindgen-cli@0.2.106, wasm-opt
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

      - name: Build WASM module for the web
        run: just build-wasm-web

      # https://github.com/actions/cache/issues/342
      - name: Clear old wasm cache
        if: ${{ steps.cache-restore.outputs.cache-hit }}
        run: |
          gh extension install actions/gh-actions-cache
          gh actions-cache delete ${{ env.WASM_CACHE_KEY }} --confirm
        env:
          GH_TOKEN: ${{ github.token }}
        continue-on-error: true

      - name: Save new wasm cache
        uses: actions/cache/save@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
        with:
          path: |
            ./target
            ./packages/@biomejs/wasm-web
          key: ${{ env.WASM_CACHE_KEY }}

      - name: Install pnpm
        # workaround for the issue https://github.com/actions/setup-node/issues/1222
        run: npm i -g --force corepack && corepack enable

      - name: Setup node
        uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
        with:
          node-version: 24.14.0
          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.sha }}'

      - name: Verify WASM artifact exists
        working-directory: packages/@biomejs/wasm-web
        run: |
          test -f biome_wasm_bg.wasm && echo "Found wasm artifact biome_wasm_bg.wasm"

      - name: Publish
        working-directory: packages/@biomejs/wasm-web
        run: pnpx pkg-pr-new publish

  repository-dispatch:
    name: Repository dispatch
    needs: build-wasm
    runs-on: depot-ubuntu-24.04
    steps:
      - name: Dispatch event
        uses: peter-evans/repository-dispatch@28959ce8df70de7be546dd1250a005dd32156697 # v4.0.1
        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": "${{ github.sha }}"}, "ref": "${{ github.ref }}"}}'