Files
renovate[bot] 1f1d7eae2e chore(deps): update github actions (#27573)
This PR contains the following updates:

| Package | Type | Update | Change | Pending |
|---|---|---|---|---|
| [CodSpeedHQ/action](https://redirect.github.com/CodSpeedHQ/action) |
action | minor | `v5.2.1` → `v5.4.0` | `v5.4.2` |
|
[actions/download-artifact](https://redirect.github.com/actions/download-artifact)
| action | patch | `v8.0.1` → `v8.0.2` | |
|
[actions/upload-artifact](https://redirect.github.com/actions/upload-artifact)
| action | patch | `v7.0.1` → `v7.0.2` | |
|
[semgrep/semgrep](https://redirect.github.com/semgrep/semgrep-proprietary)
| container | minor | `1.179.0` → `1.180.0` | |
|
[taiki-e/install-action](https://redirect.github.com/taiki-e/install-action)
| action | patch | `v2.87.22` → `v2.87.26` | `v2.87.27` |

---

### Release Notes

<details>
<summary>CodSpeedHQ/action (CodSpeedHQ/action)</summary>

###
[`v5.4.0`](https://redirect.github.com/CodSpeedHQ/action/releases/tag/v5.4.0)

[Compare
Source](https://redirect.github.com/CodSpeedHQ/action/compare/v5.2.1...v5.4.0)

Bumps the CodSpeed runner to
[v5.4.0](https://redirect.github.com/CodSpeedHQ/codspeed/releases/tag/v5.4.0),
including
[v5.3.0](https://redirect.github.com/CodSpeedHQ/codspeed/releases/tag/v5.3.0)
and
[v5.3.1](https://redirect.github.com/CodSpeedHQ/codspeed/releases/tag/v5.3.1).

The [Memory instrument](https://codspeed.io/docs/instruments/memory) now
tracks physical (resident) memory and captures allocation call stacks to
build memory flamegraphs. Both are enabled by default and can be turned
off with the new `disable-memory-track-physical` and
`disable-memory-capture-stack` inputs. Serialization is also faster on
large memory benchmarks.

The action now exposes the id of the CodSpeed run as a `run-id` output,
and CodSpeed now works on non-Ubuntu/Debian distributions such as Arch
Linux.

##### 🚀 Features

- Track physical memory and capture allocation call stacks for memory
flamegraphs, both enabled by default by
[@&#8203;not-matthias](https://redirect.github.com/not-matthias) in
[#&#8203;529](https://redirect.github.com/CodSpeedHQ/codspeed/pull/529),
[#&#8203;522](https://redirect.github.com/CodSpeedHQ/codspeed/pull/522)
and
[#&#8203;553](https://redirect.github.com/CodSpeedHQ/codspeed/pull/553)
- Expose the run id as a GitHub Actions step output by
[@&#8203;moha-bekh](https://redirect.github.com/moha-bekh) in
[#&#8203;551](https://redirect.github.com/CodSpeedHQ/codspeed/pull/551)
- Add an `--experimental-disable-pythonmalloc-override` flag
(`CODSPEED_EXPERIMENTAL_DISABLE_PYTHONMALLOC_OVERRIDE`) to stop
overriding the Python allocator, which can break free-threaded Python in
simulation mode, by
[@&#8203;not-matthias](https://redirect.github.com/not-matthias) in
[#&#8203;539](https://redirect.github.com/CodSpeedHQ/codspeed/pull/539)
- Apply kernel memory tunables before memory-mode runs, and fail early
when the kernel has no BTF by
[@&#8203;not-matthias](https://redirect.github.com/not-matthias) in
[#&#8203;507](https://redirect.github.com/CodSpeedHQ/codspeed/pull/507)
and
[#&#8203;524](https://redirect.github.com/CodSpeedHQ/codspeed/pull/524)
- Pause producers under ring buffer pressure in memory mode, and log
process stops per reason by
[@&#8203;not-matthias](https://redirect.github.com/not-matthias) in
[#&#8203;543](https://redirect.github.com/CodSpeedHQ/codspeed/pull/543)
- Log which authentication method the run uses by
[@&#8203;fargito](https://redirect.github.com/fargito) in
[#&#8203;521](https://redirect.github.com/CodSpeedHQ/codspeed/pull/521)

##### 🐛 Bug Fixes

- Support distributions CodSpeed publishes no valgrind package for
(Arch, rolling releases) by
[@&#8203;moha-bekh](https://redirect.github.com/moha-bekh) in
[#&#8203;525](https://redirect.github.com/CodSpeedHQ/codspeed/pull/525)
- Error out when the profile archive exceeds the upload size limit by
[@&#8203;lvaroqui](https://redirect.github.com/lvaroqui) in
[#&#8203;557](https://redirect.github.com/CodSpeedHQ/codspeed/pull/557)
- Detect free-threaded Python from venv and uv before setting
`PYTHONMALLOC` by
[@&#8203;not-matthias](https://redirect.github.com/not-matthias) in
[#&#8203;539](https://redirect.github.com/CodSpeedHQ/codspeed/pull/539)
- Honor deprecated experimental flags, including their falsey values,
instead of ignoring them by
[@&#8203;not-matthias](https://redirect.github.com/not-matthias) in
[#&#8203;532](https://redirect.github.com/CodSpeedHQ/codspeed/pull/532)
and
[#&#8203;553](https://redirect.github.com/CodSpeedHQ/codspeed/pull/553)
- Fix memory tracking edge cases: reused pids, stack-ring overflow, BPF
links held by forked processes, and allocator symbols aliased at an
attached offset by
[@&#8203;not-matthias](https://redirect.github.com/not-matthias) in
[#&#8203;522](https://redirect.github.com/CodSpeedHQ/codspeed/pull/522)
and
[#&#8203;543](https://redirect.github.com/CodSpeedHQ/codspeed/pull/543)
- Attach memory tracking hooks without `perf_event_open` by
[@&#8203;GuillaumeLagrange](https://redirect.github.com/GuillaumeLagrange)
in
[#&#8203;536](https://redirect.github.com/CodSpeedHQ/codspeed/pull/536)
- Restore profiling sysctls in walltime mode by
[@&#8203;not-matthias](https://redirect.github.com/not-matthias) in
[#&#8203;507](https://redirect.github.com/CodSpeedHQ/codspeed/pull/507)

##### ⚡ Performance

- Speed up memory serialization and reduce the tracker's memory usage on
large memory benchmarks by
[@&#8203;not-matthias](https://redirect.github.com/not-matthias) in
[#&#8203;522](https://redirect.github.com/CodSpeedHQ/codspeed/pull/522),
[#&#8203;537](https://redirect.github.com/CodSpeedHQ/codspeed/pull/537),
[#&#8203;548](https://redirect.github.com/CodSpeedHQ/codspeed/pull/548),
[#&#8203;558](https://redirect.github.com/CodSpeedHQ/codspeed/pull/558)
and
[#&#8203;560](https://redirect.github.com/CodSpeedHQ/codspeed/pull/560)

##### ⚙️ Internals

- Pin memtrack to 1.6.0, through 1.5.0 and 1.5.1, by
[@&#8203;adriencaccia](https://redirect.github.com/adriencaccia) in
[#&#8203;530](https://redirect.github.com/CodSpeedHQ/codspeed/pull/530),
[#&#8203;541](https://redirect.github.com/CodSpeedHQ/codspeed/pull/541)
and
[#&#8203;561](https://redirect.github.com/CodSpeedHQ/codspeed/pull/561)
- Keep mmap/munmap/brk as deprecated memtrack artifact variants by
[@&#8203;GuillaumeLagrange](https://redirect.github.com/GuillaumeLagrange)
in
[#&#8203;538](https://redirect.github.com/CodSpeedHQ/codspeed/pull/538)

**Full Runner Changelog**:
<https://github.com/CodSpeedHQ/codspeed/blob/main/CHANGELOG.md>

#### What's Changed

- chore: bump runner version to 5.3.0 by
[@&#8203;github-actions](https://redirect.github.com/github-actions)\[bot]
in [#&#8203;239](https://redirect.github.com/CodSpeedHQ/action/pull/239)
- feat: add memory-track-physical experimental input by
[@&#8203;not-matthias](https://redirect.github.com/not-matthias) in
[#&#8203;238](https://redirect.github.com/CodSpeedHQ/action/pull/238)
- chore: bump runner version to 5.3.1 by
[@&#8203;github-actions](https://redirect.github.com/github-actions)\[bot]
in [#&#8203;240](https://redirect.github.com/CodSpeedHQ/action/pull/240)
- feat: add a run-id output by
[@&#8203;moha-bekh](https://redirect.github.com/moha-bekh) in
[#&#8203;243](https://redirect.github.com/CodSpeedHQ/action/pull/243)
- chore: bump runner version to 5.4.0 by
[@&#8203;github-actions](https://redirect.github.com/github-actions)\[bot]
in [#&#8203;244](https://redirect.github.com/CodSpeedHQ/action/pull/244)
- feat: add disable-memory-capture-stack and
disable-memory-track-physical inputs by
[@&#8203;not-matthias](https://redirect.github.com/not-matthias) in
[#&#8203;242](https://redirect.github.com/CodSpeedHQ/action/pull/242)

#### New Contributors

- [@&#8203;moha-bekh](https://redirect.github.com/moha-bekh) made their
first contribution in
[#&#8203;243](https://redirect.github.com/CodSpeedHQ/action/pull/243)

**Full Changelog**:
<https://github.com/CodSpeedHQ/action/compare/v5.2.1...v5.4.0>

</details>

<details>
<summary>actions/download-artifact (actions/download-artifact)</summary>

###
[`v8.0.2`](https://redirect.github.com/actions/download-artifact/releases/tag/v8.0.2)

[Compare
Source](https://redirect.github.com/actions/download-artifact/compare/v8.0.1...v8.0.2)

##### What's Changed

- Update the readme by
[@&#8203;danwkennedy](https://redirect.github.com/danwkennedy) in
[#&#8203;473](https://redirect.github.com/actions/download-artifact/pull/473)
- Improves artifact download retries when the service returns HTTP 429
(rate limiting), including honoring valid Retry-After headers.
- Update
[@&#8203;actions/artifact](https://redirect.github.com/actions/artifact)
to 6.3.1 by [@&#8203;tunc-d](https://redirect.github.com/tunc-d) in
[#&#8203;492](https://redirect.github.com/actions/download-artifact/pull/492)
- Prepare download-artifact v8.0.2 by
[@&#8203;tunc-d](https://redirect.github.com/tunc-d) in
[#&#8203;493](https://redirect.github.com/actions/download-artifact/pull/493)

##### New Contributors

- [@&#8203;tunc-d](https://redirect.github.com/tunc-d) made their first
contribution in
[#&#8203;492](https://redirect.github.com/actions/download-artifact/pull/492)

**Full Changelog**:
<https://github.com/actions/download-artifact/compare/v8.0.1...v8.0.2>

</details>

<details>
<summary>actions/upload-artifact (actions/upload-artifact)</summary>

###
[`v7.0.2`](https://redirect.github.com/actions/upload-artifact/releases/tag/v7.0.2)

[Compare
Source](https://redirect.github.com/actions/upload-artifact/compare/v7.0.1...v7.0.2)

##### What's Changed

- Improves artifact download retries when the service returns HTTP 429
(rate limiting), including honoring valid Retry-After headers.
- Updates
[@&#8203;actions/artifact](https://redirect.github.com/actions/artifact)
to v6.3.1.

##### New Contributors

- [@&#8203;tunc-d](https://redirect.github.com/tunc-d) made their first
contribution in
[#&#8203;821](https://redirect.github.com/actions/upload-artifact/pull/821)

**Full Changelog**:
<https://github.com/actions/upload-artifact/compare/v7.0.1...v7.0.2>

</details>

<details>
<summary>taiki-e/install-action (taiki-e/install-action)</summary>

###
[`v2.87.26`](https://redirect.github.com/taiki-e/install-action/releases/tag/v2.87.26):
2.87.26

[Compare
Source](https://redirect.github.com/taiki-e/install-action/compare/v2.87.25...v2.87.26)

- Update `tombi@latest` to 1.7.2.

- Update `prek@latest` to 0.5.5.

- Update `mise@latest` to 2026.10.3.

- Update `kache@latest` to 1.0.0.

- Update `hyperfine@latest` to 1.21.0.

###
[`v2.87.25`](https://redirect.github.com/taiki-e/install-action/releases/tag/v2.87.25):
2.87.25

[Compare
Source](https://redirect.github.com/taiki-e/install-action/compare/v2.87.24...v2.87.25)

- Update `uv@latest` to 0.12.23.

- Update `mise@latest` to 2026.10.2.

- Update `kingfisher@latest` to 2.10.0.

- Update `dprint@latest` to 0.60.1.

- Update `cargo-semver-checks@latest` to 0.51.0.

- Update `cargo-binstall@latest` to 1.25.1.

###
[`v2.87.24`](https://redirect.github.com/taiki-e/install-action/releases/tag/v2.87.24):
2.87.24

[Compare
Source](https://redirect.github.com/taiki-e/install-action/compare/v2.87.23...v2.87.24)

- Update `wasmtime@latest` to 49.0.2.

- Update `dprint@latest` to 0.59.0.

- Update `cargo-leptos@latest` to 0.3.11.

- Update `cargo-insta@latest` to 1.49.0.

- Update `cargo-binstall@latest` to 1.25.0.

###
[`v2.87.23`](https://redirect.github.com/taiki-e/install-action/releases/tag/v2.87.23):
2.87.23

[Compare
Source](https://redirect.github.com/taiki-e/install-action/compare/v2.87.22...v2.87.23)

- Update `wasm-tools@latest` to 1.261.0.

- Update `uv@latest` to 0.12.22.

- Update `trivy@latest` to 0.75.0.

- Update `tombi@latest` to 1.7.1.

- Update `protoc-gen-connect-openapi@latest` to 0.28.0.

- Update `mise@latest` to 2026.10.0.

- Update `kingfisher@latest` to 2.9.1.

- Update `kache@latest` to 0.28.1.

- Update `espup@latest` to 0.18.0.

- Update `dprint@latest` to 0.58.0.

- Update `cargo-crap@latest` to 0.6.1.

- Update `cargo-auditable@latest` to 0.7.7.

- Update `biome@latest` to 2.5.15.

- Update `syft@latest` to 1.54.0.

</details>

---

### Configuration

📅 **Schedule**: (in timezone Asia/Shanghai)

- Branch creation
  - "before 10am on monday"
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config
help](https://redirect.github.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/oxc-project/oxc).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xMzQuMSIsInVwZGF0ZWRJblZlciI6IjQ0LjEzNC4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-10-12 01:40:10 +00:00

789 lines
31 KiB
YAML

name: Release Apps
permissions: {}
on:
workflow_dispatch:
push:
branches:
- main
paths:
- npm/oxfmt/package.json
- npm/oxlint/package.json
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
check:
if: github.repository == 'oxc-project/oxc'
name: Check version
runs-on: ubuntu-slim
outputs:
version_changed: ${{ steps.oxfmt.outputs.version_changed && steps.oxlint.outputs.version_changed }}
oxfmt_version: ${{ steps.oxfmt.outputs.version }}
oxlint_version: ${{ steps.oxlint.outputs.version }}
steps:
- uses: taiki-e/checkout-action@7d1e50e93dc4fb3bba58f85018fadf77898aee8b # v1.4.2
- uses: oxc-project/setup-node@f46a72f95efdc55273fcd042d61c84e723b2892c # v1.4.1
- parallel:
- uses: $/.github/actions/check-version
id: oxfmt
with:
file-name: npm/oxfmt/package.json
file-url: https://unpkg.com/oxfmt@latest/package.json
- uses: $/.github/actions/check-version
id: oxlint
with:
file-name: npm/oxlint/package.json
file-url: https://unpkg.com/oxlint@latest/package.json
- name: Validate rule versions
if: steps.oxlint.outputs.version_changed == 'true'
env:
OXLINT_VERSION: ${{ steps.oxlint.outputs.version }}
run: |
node .github/scripts/update-rule-versions.mts --release-version "$OXLINT_VERSION" --write
git diff --exit-code -- crates/oxc_linter/src/rules
build-oxlint:
needs: check
if: needs.check.outputs.version_changed == 'true'
strategy:
fail-fast: false
matrix:
include:
- os: windows-latest
target: x86_64-pc-windows-msvc
build: pnpm run build-napi-release --target x86_64-pc-windows-msvc
- os: windows-latest
target: aarch64-pc-windows-msvc
build: pnpm run build-napi-release --target aarch64-pc-windows-msvc
- os: windows-latest
target: i686-pc-windows-msvc
build: pnpm run build-napi-release --target i686-pc-windows-msvc
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
build: pnpm run build-napi-release --target x86_64-unknown-linux-gnu --use-napi-cross
- os: ubuntu-latest
target: aarch64-unknown-linux-gnu
build: pnpm run build-napi-release --target aarch64-unknown-linux-gnu --use-napi-cross
- os: ubuntu-latest
target: armv7-unknown-linux-gnueabihf
build: pnpm run build-napi-release --target armv7-unknown-linux-gnueabihf --use-napi-cross
- os: ubuntu-latest
target: x86_64-unknown-linux-musl
build: pnpm run build-napi-release --target x86_64-unknown-linux-musl -x
- os: ubuntu-latest
target: aarch64-unknown-linux-musl
build: pnpm run build-napi-release --target aarch64-unknown-linux-musl -x
- os: ubuntu-latest
target: armv7-unknown-linux-musleabihf
build: pnpm run build-napi-release --target armv7-unknown-linux-musleabihf -x
- os: macos-latest
target: x86_64-apple-darwin
build: pnpm run build-napi-release --target x86_64-apple-darwin
- os: macos-latest
target: aarch64-apple-darwin
build: pnpm run build-napi-release --target aarch64-apple-darwin
- os: ubuntu-latest
target: aarch64-linux-android
build: pnpm run build-napi-release --target aarch64-linux-android
- os: ubuntu-latest
target: armv7-linux-androideabi
build: pnpm run build-napi-release --target armv7-linux-androideabi
- os: ubuntu-latest
target: aarch64-unknown-linux-ohos
build: pnpm run build-napi-release --target aarch64-unknown-linux-ohos
- os: ubuntu-latest
target: powerpc64le-unknown-linux-gnu
build: pnpm run build-napi-release --target powerpc64le-unknown-linux-gnu --use-napi-cross
- os: ubuntu-latest
target: riscv64gc-unknown-linux-gnu
build: |
sudo apt-get update
sudo apt-get install gcc-riscv64-linux-gnu g++-riscv64-linux-gnu -y
export TARGET_CC=riscv64-linux-gnu-gcc
export CXX=riscv64-linux-gnu-g++
pnpm run build-napi-release --target riscv64gc-unknown-linux-gnu
- os: ubuntu-latest
target: riscv64gc-unknown-linux-musl
build: pnpm run build-napi-release --target riscv64gc-unknown-linux-musl -x
- os: ubuntu-latest
target: s390x-unknown-linux-gnu
build: export CFLAGS="-fuse-ld=lld" && pnpm run build-napi-release --target s390x-unknown-linux-gnu --use-napi-cross
name: Build Oxlint ${{ matrix.target }}
runs-on: ${{ matrix.os }}
env:
# `clang` lacks the `__ldar64`/`__stlr64` MSVC intrinsics that mimalloc's
# atomic.h uses on the ARM64 MSVC C path, so leave TARGET_CC unset on
# `*-pc-windows-msvc` targets and let cc-rs pick `cl.exe`.
TARGET_CC: ${{ !contains(matrix.target, 'pc-windows-msvc') && 'clang' || '' }} # for mimalloc
defaults:
run:
shell: bash
steps:
- if: ${{ contains(matrix.os, 'windows') }}
run: git config --system core.longpaths true
- name: Install cross
id: install-cross
uses: taiki-e/install-action@f7e5d7c961414b23f5b25b2da9294395d08513ad # v2.87.26
with:
tool: cross # cross installs the latest rust toolchain
background: true
- uses: taiki-e/checkout-action@7d1e50e93dc4fb3bba58f85018fadf77898aee8b # v1.4.2
# No Rust cache is provided, to avoid cache poisoning attack.
- parallel:
- uses: oxc-project/setup-node@f46a72f95efdc55273fcd042d61c84e723b2892c # v1.4.1
# For cargo-zigbuild in musl builds.
- uses: goto-bus-stop/setup-zig@abea47f85e598557f500fa1fd2ab7464fcb39406 # v2.2.1
if: ${{ contains(matrix.target, 'musl') }}
with:
version: 0.13.0
- name: Setup OpenHarmony SDK
if: ${{ contains(matrix.target, 'ohos') }}
uses: Boshen/setup-ohos-sdk@edb865a89a712f1f15dbad932dfa9cfce849d95c # v1.0.0
- wait: install-cross
- name: Add Rust Target
run: rustup target add ${{ matrix.target }}
- name: Build oxlint for node.js
working-directory: apps/oxlint
run: ${{ matrix.build }}
- name: Build Rust binary
if: ${{ !contains(matrix.target, 'wasm') && !contains(matrix.target, 'android') && !contains(matrix.target, 'ohos') && !contains(matrix.target, 'riscv64gc-unknown-linux-musl') }}
run: cross build --release -p oxlint --features allocator --target=${{ matrix.target }}
- name: Build Rust binary (zigbuild)
if: ${{ contains(matrix.target, 'riscv64gc-unknown-linux-musl') }}
run: |
pip3 install cargo-zigbuild
cargo zigbuild --release -p oxlint --features allocator --target=${{ matrix.target }}
- parallel:
- name: Upload NAPI artifact
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
if-no-files-found: error
name: oxlint-bindings-${{ matrix.target }}
path: |
apps/oxlint/src-js/*.node
apps/oxlint/src-js/*.wasm
# The binaries are zipped to fix permission loss https://github.com/actions/upload-artifact#permission-loss
- name: Archive Rust binary
if: ${{ !contains(matrix.target, 'wasm') && !contains(matrix.target, 'android') && !contains(matrix.target, 'ohos') }}
uses: $/.github/actions/archive-binary
with:
source_path: target/${{ matrix.target }}/release/oxlint${{ runner.os == 'Windows' && '.exe' || '' }}
binary_name: oxlint-${{ matrix.target }}${{ runner.os == 'Windows' && '.exe' || '' }}
archive_name: rust-oxlint-${{ matrix.target }}
# For github release
- name: Upload Rust binary
if: ${{ !contains(matrix.target, 'wasm') && !contains(matrix.target, 'android') && !contains(matrix.target, 'ohos') }}
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
if-no-files-found: error
name: rust-oxlint-${{ matrix.target }}
path: |
rust-oxlint-**.zip
rust-oxlint-**.tar.gz
build-oxlint-freebsd:
needs: check
if: needs.check.outputs.version_changed == 'true'
name: Build Oxlint FreeBSD
runs-on: ubuntu-latest
steps:
- uses: taiki-e/checkout-action@7d1e50e93dc4fb3bba58f85018fadf77898aee8b # v1.4.2
- parallel:
- uses: oxc-project/setup-node@f46a72f95efdc55273fcd042d61c84e723b2892c # v1.4.1
- run: rustup target add x86_64-unknown-freebsd
- name: Install Zig
uses: mlugg/setup-zig@d1434d08867e3ee9daa34448df10607b98908d29 # v2.2.1
with:
version: "0.15.2"
- name: Install cargo-zigbuild
uses: jaxxstorm/action-install-gh-release@25e24d2d23ae098373794ef1d6faecb48ee52da8 # v3.0.0
with:
repo: rust-cross/cargo-zigbuild
- name: Build oxlint for node.js
working-directory: apps/oxlint
run: pnpm run build-napi-release --target x86_64-unknown-freebsd -x
- name: Build Rust binary
run: cargo zigbuild --release -p oxlint --features allocator --target=x86_64-unknown-freebsd
- parallel:
- name: Upload NAPI artifact
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
if-no-files-found: error
name: oxlint-bindings-x86_64-unknown-freebsd
path: apps/oxlint/src-js/*.node
- name: Archive Rust binary
uses: $/.github/actions/archive-binary
with:
source_path: target/x86_64-unknown-freebsd/release/oxlint
binary_name: oxlint-x86_64-unknown-freebsd
archive_name: rust-oxlint-x86_64-unknown-freebsd
- name: Upload Rust binary
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
if-no-files-found: error
name: rust-oxlint-x86_64-unknown-freebsd
path: |
rust-oxlint-**.zip
rust-oxlint-**.tar.gz
notify-approval:
needs: [check, build-oxlint, build-oxlint-freebsd, build-oxfmt, build-oxfmt-freebsd]
if: needs.check.outputs.version_changed == 'true'
name: Notify Approval
runs-on: ubuntu-slim
steps:
- uses: tsickert/discord-webhook@b217a69502f52803de774ded2b1ab7c282e99645 # v7.0.0
with:
webhook-url: ${{ secrets.DISCORD_OXC_CORE_CHANNEL }}
content: "Requesting approval: https://github.com/oxc-project/oxc/actions/workflows/release_apps.yml"
publish-oxlint:
name: Publish Oxlint
needs: [check, build-oxlint, build-oxlint-freebsd, notify-approval]
runs-on: ubuntu-latest
environment: release
permissions:
id-token: write # for `pnpm publish --provenance`
env:
package_path: npm/oxlint
plugins_package_path: npm/oxlint-plugins
plugin_eslint_package_path: npm/oxlint-plugin-eslint
npm_dir: npm/oxlint-release
PUBLISH_FLAGS: "--provenance --access public --no-git-checks"
steps:
- uses: taiki-e/checkout-action@7d1e50e93dc4fb3bba58f85018fadf77898aee8b # v1.4.2
- parallel:
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
with:
path: artifacts
pattern: oxlint-bindings-*
- uses: oxc-project/setup-node@f46a72f95efdc55273fcd042d61c84e723b2892c # v1.4.1
- name: Generate oxlint JS build
working-directory: apps/oxlint
run: pnpm run build-js
- run: mkdir -p ${npm_dir}
- run: pnpm napi create-npm-dirs --package-json-path ${package_path}/package.json --npm-dir ${npm_dir}
- run: pnpm napi artifacts --package-json-path ${package_path}/package.json --build-output-dir apps/oxlint/src-js --npm-dir ${npm_dir}
- name: Copy dist files to npm package
run: cp -r apps/oxlint/dist npm/oxlint/dist
- name: Copy dist files to @oxlint/plugins npm package
run: |
cp apps/oxlint/dist-pkg-plugins/* ${plugins_package_path}/
- name: Copy dist files to oxlint-plugin-eslint npm package
run: |
cp -r apps/oxlint/dist-pkg-plugin-eslint/. ${plugin_eslint_package_path}/
- name: Check Publish
run: |
node .github/scripts/check-npm-packages.js "${npm_dir}/*" "${package_path}"
node .github/scripts/check-npm-packages.js "${plugins_package_path}"
node .github/scripts/check-npm-packages.js "${plugin_eslint_package_path}"
- name: Trusted Publish
run: |
# Trusted publishing is configured, publish token is not required.
# Publish sub-packages and adds `optionalDependencies` to main package.
pnpm napi pre-publish --no-gh-release -t npm --package-json-path ${package_path}/package.json --npm-dir ${npm_dir}
# npm publish can finish before package metadata and tarballs are available.
node .github/scripts/wait-for-npm-packages.mjs ${npm_dir}/*
# Publish `oxlint` package
bash .github/scripts/publish-if-needed.sh ${package_path} ${PUBLISH_FLAGS}
# Publish `@oxlint/plugins` package
bash .github/scripts/publish-if-needed.sh ${plugins_package_path} ${PUBLISH_FLAGS}
# Publish `oxlint-plugin-eslint` package
bash .github/scripts/publish-if-needed.sh ${plugin_eslint_package_path} ${PUBLISH_FLAGS}
build-oxfmt:
needs: check
if: needs.check.outputs.version_changed == 'true'
strategy:
fail-fast: false
matrix:
include:
- os: windows-latest
target: x86_64-pc-windows-msvc
build: pnpm run build-napi-release --target x86_64-pc-windows-msvc
- os: windows-latest
target: aarch64-pc-windows-msvc
build: pnpm run build-napi-release --target aarch64-pc-windows-msvc
- os: windows-latest
target: i686-pc-windows-msvc
build: pnpm run build-napi-release --target i686-pc-windows-msvc
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
build: pnpm run build-napi-release --target x86_64-unknown-linux-gnu --use-napi-cross
- os: ubuntu-latest
target: aarch64-unknown-linux-gnu
build: pnpm run build-napi-release --target aarch64-unknown-linux-gnu --use-napi-cross
- os: ubuntu-latest
target: armv7-unknown-linux-gnueabihf
build: pnpm run build-napi-release --target armv7-unknown-linux-gnueabihf --use-napi-cross
- os: ubuntu-latest
target: x86_64-unknown-linux-musl
build: pnpm run build-napi-release --target x86_64-unknown-linux-musl -x
- os: ubuntu-latest
target: aarch64-unknown-linux-musl
build: pnpm run build-napi-release --target aarch64-unknown-linux-musl -x
- os: ubuntu-latest
target: armv7-unknown-linux-musleabihf
build: pnpm run build-napi-release --target armv7-unknown-linux-musleabihf -x
- os: macos-latest
target: x86_64-apple-darwin
build: pnpm run build-napi-release --target x86_64-apple-darwin
- os: macos-latest
target: aarch64-apple-darwin
build: pnpm run build-napi-release --target aarch64-apple-darwin
- os: ubuntu-latest
target: aarch64-linux-android
build: pnpm run build-napi-release --target aarch64-linux-android
- os: ubuntu-latest
target: armv7-linux-androideabi
build: pnpm run build-napi-release --target armv7-linux-androideabi
- os: ubuntu-latest
target: aarch64-unknown-linux-ohos
build: pnpm run build-napi-release --target aarch64-unknown-linux-ohos
- os: ubuntu-latest
target: powerpc64le-unknown-linux-gnu
build: pnpm run build-napi-release --target powerpc64le-unknown-linux-gnu --use-napi-cross
- os: ubuntu-latest
target: riscv64gc-unknown-linux-gnu
build: |
sudo apt-get update
sudo apt-get install gcc-riscv64-linux-gnu g++-riscv64-linux-gnu -y
export TARGET_CC=riscv64-linux-gnu-gcc
export CXX=riscv64-linux-gnu-g++
pnpm run build-napi-release --target riscv64gc-unknown-linux-gnu
- os: ubuntu-latest
target: riscv64gc-unknown-linux-musl
build: pnpm run build-napi-release --target riscv64gc-unknown-linux-musl -x
- os: ubuntu-latest
target: s390x-unknown-linux-gnu
build: export CFLAGS="-fuse-ld=lld" && pnpm run build-napi-release --target s390x-unknown-linux-gnu --use-napi-cross
name: Build Oxfmt ${{ matrix.target }}
runs-on: ${{ matrix.os }}
env:
# `clang` lacks the `__ldar64`/`__stlr64` MSVC intrinsics that mimalloc's
# atomic.h uses on the ARM64 MSVC C path, so leave TARGET_CC unset on
# `*-pc-windows-msvc` targets and let cc-rs pick `cl.exe`.
TARGET_CC: ${{ !contains(matrix.target, 'pc-windows-msvc') && 'clang' || '' }} # for mimalloc
defaults:
run:
shell: bash
steps:
- if: ${{ contains(matrix.os, 'windows') }}
run: git config --system core.longpaths true
- name: Install cross
id: install-cross
uses: taiki-e/install-action@f7e5d7c961414b23f5b25b2da9294395d08513ad # v2.87.26
with:
tool: cross # cross installs the latest rust toolchain
background: true
- uses: taiki-e/checkout-action@7d1e50e93dc4fb3bba58f85018fadf77898aee8b # v1.4.2
# No Rust cache is provided, to avoid cache poisoning attack.
- parallel:
- uses: oxc-project/setup-node@f46a72f95efdc55273fcd042d61c84e723b2892c # v1.4.1
# For cargo-zigbuild in musl builds.
- uses: goto-bus-stop/setup-zig@abea47f85e598557f500fa1fd2ab7464fcb39406 # v2.2.1
if: ${{ contains(matrix.target, 'musl') }}
with:
version: 0.13.0
- name: Setup OpenHarmony SDK
if: ${{ contains(matrix.target, 'ohos') }}
uses: Boshen/setup-ohos-sdk@edb865a89a712f1f15dbad932dfa9cfce849d95c # v1.0.0
- wait: install-cross
- name: Add Rust Target
run: rustup target add ${{ matrix.target }}
- name: Build oxfmt for node.js
working-directory: apps/oxfmt
run: ${{ matrix.build }}
- name: Build Rust binary
if: ${{ !contains(matrix.target, 'wasm') && !contains(matrix.target, 'android') && !contains(matrix.target, 'ohos') && !contains(matrix.target, 'riscv64gc-unknown-linux-musl') }}
run: cross build --release -p oxfmt --no-default-features --features allocator --target=${{ matrix.target }}
- name: Build Rust binary (zigbuild)
if: ${{ contains(matrix.target, 'riscv64gc-unknown-linux-musl') }}
run: |
pip3 install cargo-zigbuild
cargo zigbuild --release -p oxfmt --no-default-features --features allocator --target=${{ matrix.target }}
- parallel:
- name: Upload NAPI artifact
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
if-no-files-found: error
name: oxfmt-bindings-${{ matrix.target }}
path: |
apps/oxfmt/src-js/*.node
apps/oxfmt/src-js/*.wasm
# The binaries are zipped to fix permission loss https://github.com/actions/upload-artifact#permission-loss
- name: Archive Rust binary
if: ${{ !contains(matrix.target, 'wasm') && !contains(matrix.target, 'android') && !contains(matrix.target, 'ohos') }}
uses: $/.github/actions/archive-binary
with:
source_path: target/${{ matrix.target }}/release/oxfmt${{ runner.os == 'Windows' && '.exe' || '' }}
binary_name: oxfmt-${{ matrix.target }}${{ runner.os == 'Windows' && '.exe' || '' }}
archive_name: rust-oxfmt-${{ matrix.target }}
# For github release
- name: Upload Rust binary
if: ${{ !contains(matrix.target, 'wasm') && !contains(matrix.target, 'android') && !contains(matrix.target, 'ohos') }}
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
if-no-files-found: error
name: rust-oxfmt-${{ matrix.target }}
path: |
rust-oxfmt-**.zip
rust-oxfmt-**.tar.gz
build-oxfmt-freebsd:
needs: check
if: needs.check.outputs.version_changed == 'true'
name: Build Oxfmt FreeBSD
runs-on: ubuntu-latest
steps:
- uses: taiki-e/checkout-action@7d1e50e93dc4fb3bba58f85018fadf77898aee8b # v1.4.2
- parallel:
- uses: oxc-project/setup-node@f46a72f95efdc55273fcd042d61c84e723b2892c # v1.4.1
- run: rustup target add x86_64-unknown-freebsd
- name: Install Zig
uses: mlugg/setup-zig@d1434d08867e3ee9daa34448df10607b98908d29 # v2.2.1
with:
version: "0.15.2"
- name: Install cargo-zigbuild
uses: jaxxstorm/action-install-gh-release@25e24d2d23ae098373794ef1d6faecb48ee52da8 # v3.0.0
with:
repo: rust-cross/cargo-zigbuild
- name: Build oxfmt for node.js
working-directory: apps/oxfmt
run: pnpm run build-napi-release --target x86_64-unknown-freebsd -x
- name: Build Rust binary
run: cargo zigbuild --release -p oxfmt --no-default-features --features allocator --target=x86_64-unknown-freebsd
- parallel:
- name: Upload NAPI artifact
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
if-no-files-found: error
name: oxfmt-bindings-x86_64-unknown-freebsd
path: apps/oxfmt/src-js/*.node
- name: Archive Rust binary
uses: $/.github/actions/archive-binary
with:
source_path: target/x86_64-unknown-freebsd/release/oxfmt
binary_name: oxfmt-x86_64-unknown-freebsd
archive_name: rust-oxfmt-x86_64-unknown-freebsd
- name: Upload Rust binary
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
if-no-files-found: error
name: rust-oxfmt-x86_64-unknown-freebsd
path: |
rust-oxfmt-**.zip
rust-oxfmt-**.tar.gz
publish-oxfmt:
name: Publish Oxfmt
needs: [check, build-oxfmt, build-oxfmt-freebsd, notify-approval]
runs-on: ubuntu-latest
environment: release
permissions:
id-token: write # for `pnpm publish --provenance`
env:
package_path: npm/oxfmt
npm_dir: npm/oxfmt-release
PUBLISH_FLAGS: "--provenance --access public --no-git-checks"
steps:
- uses: taiki-e/checkout-action@7d1e50e93dc4fb3bba58f85018fadf77898aee8b # v1.4.2
- parallel:
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
with:
path: artifacts
pattern: oxfmt-bindings-*
- uses: oxc-project/setup-node@f46a72f95efdc55273fcd042d61c84e723b2892c # v1.4.1
- name: Generate oxfmt JS build
working-directory: apps/oxfmt
run: pnpm run build-js
- run: mkdir -p ${npm_dir}
- run: pnpm napi create-npm-dirs --package-json-path ${package_path}/package.json --npm-dir ${npm_dir}
- run: pnpm napi artifacts --package-json-path ${package_path}/package.json --build-output-dir apps/oxfmt/src-js --npm-dir ${npm_dir}
- name: Copy dist files to npm package
run: cp -r apps/oxfmt/dist npm/oxfmt/dist
- name: Check Publish
run: node .github/scripts/check-npm-packages.js "${npm_dir}/*" "${package_path}"
- name: Trusted Publish
run: |
# Trusted publishing is configured, publish token is not required.
# Publish sub-packages and adds `optionalDependencies` to main package.
pnpm napi pre-publish --no-gh-release -t npm --package-json-path ${package_path}/package.json --npm-dir ${npm_dir}
# npm publish can finish before package metadata and tarballs are available.
node .github/scripts/wait-for-npm-packages.mjs ${npm_dir}/*
bash .github/scripts/publish-if-needed.sh ${package_path} ${PUBLISH_FLAGS}
github-release:
name: GitHub Releases
needs:
[
check,
build-oxlint,
build-oxlint-freebsd,
build-oxfmt,
build-oxfmt-freebsd,
publish-oxlint,
publish-oxfmt,
]
permissions:
contents: write # for `gh release create`
runs-on: ubuntu-latest
steps:
- uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
id: app-token
with:
client-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
permission-contents: write
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
token: ${{ steps.app-token.outputs.token }}
fetch-depth: 0 # for changelog
filter: blob:none
persist-credentials: true
- uses: oxc-project/setup-rust@3d6fb132fbe7cdcb66bf8ec193911c2945369d12 # v1.0.17
with:
restore-cache: false
tools: cargo-release-oxc
- name: Generate changelog
run: |
mkdir -p target
cargo release-oxc changelog --release oxfmt --release oxlint
- name: Tag Oxlint and Oxfmt
env:
NEEDS_CHECK_OUTPUTS_OXFMT_VERSION: ${{ needs.check.outputs.oxfmt_version }}
NEEDS_CHECK_OUTPUTS_OXLINT_VERSION: ${{ needs.check.outputs.oxlint_version }}
run: |
git tag oxfmt_v${NEEDS_CHECK_OUTPUTS_OXFMT_VERSION} ${{ github.sha }}
git tag oxlint_v${NEEDS_CHECK_OUTPUTS_OXLINT_VERSION} ${{ github.sha }}
git push origin oxlint_v${NEEDS_CHECK_OUTPUTS_OXLINT_VERSION} oxfmt_v${NEEDS_CHECK_OUTPUTS_OXFMT_VERSION}
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
with:
path: ./release-artifacts
pattern: rust-*
merge-multiple: true
- name: Remove rust- prefix from filenames
run: |
cd release-artifacts
for file in rust-*; do
mv "$file" "${file#rust-}"
done
ls
- name: Create Oxfmt GitHub Release
env:
GH_TOKEN: ${{ github.token }}
GIT_TAG: oxfmt_v${{ needs.check.outputs.oxfmt_version }}
TITLE: oxfmt v${{ needs.check.outputs.oxfmt_version }}
run: gh release create "${GIT_TAG}" ./release-artifacts/oxfmt-* --title "${TITLE}" --notes-file ./target/OXFMT_CHANGELOG --verify-tag --latest=false
- name: Create Oxlint GitHub Release
env:
GH_TOKEN: ${{ github.token }}
GIT_TAG: oxlint_v${{ needs.check.outputs.oxlint_version }}
TITLE: oxlint v${{ needs.check.outputs.oxlint_version }}
run: gh release create "${GIT_TAG}" ./release-artifacts/oxlint-* --title "${TITLE}" --notes-file ./target/OXLINT_CHANGELOG --verify-tag --latest
- name: wait 3 minutes for smoke test
run: sleep 180s
smoke:
needs: [check, github-release]
strategy:
fail-fast: false
matrix:
include:
- os: windows-latest
- os: ubuntu-latest
- os: ubuntu-latest
container: node:24-alpine # musl
- os: macos-latest
name: Smoke Test ${{ matrix.os }} ${{ matrix.container }}
runs-on: ${{ matrix.os }}
container: ${{ matrix.container }}
env:
RELEASE_EMBED_TITLE: oxlint v${{ needs.check.outputs.oxlint_version }} & oxfmt v${{ needs.check.outputs.oxfmt_version }}
RELEASE_EMBED_DESCRIPTION: New releases are available! Check the changelogs for details.
RELEASE_EMBED_URL: https://github.com/${{ github.repository }}/releases
steps:
- name: Test
# These commands should be run on these defaults:
# - windows: pwsh
# - ubuntu: bash
# - alpine: sh
# - macos: bash
run: | # zizmor: ignore[template-injection]
echo "" > test.js
ldd --version || true
npx oxfmt@${{ needs.check.outputs.oxfmt_version }} ./test.js
npx oxlint@${{ needs.check.outputs.oxlint_version }} ./test.js
- if: ${{ matrix.os == 'windows-latest' }}
uses: tsickert/discord-webhook@b217a69502f52803de774ded2b1ab7c282e99645 # v7.0.0
with:
webhook-url: ${{ secrets.DISCORD_OXC_CORE_CHANNEL }}
embed-title: ${{ env.RELEASE_EMBED_TITLE }}
embed-description: ${{ env.RELEASE_EMBED_DESCRIPTION }}
embed-url: ${{ env.RELEASE_EMBED_URL }}
- if: ${{ matrix.os == 'windows-latest' }}
uses: tsickert/discord-webhook@b217a69502f52803de774ded2b1ab7c282e99645 # v7.0.0
with:
webhook-url: ${{ secrets.DISCORD_OXC_RELEASES_CHANNEL }}
embed-title: ${{ env.RELEASE_EMBED_TITLE }}
embed-description: ${{ env.RELEASE_EMBED_DESCRIPTION }}
embed-url: ${{ env.RELEASE_EMBED_URL }}
bump:
needs: [check, smoke]
name: Bump oxlint dependents
runs-on: ubuntu-slim
steps:
- uses: taiki-e/checkout-action@7d1e50e93dc4fb3bba58f85018fadf77898aee8b # v1.4.2
- uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
id: app-token
with:
client-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
permission-actions: write
owner: oxc-project
repositories: |
eslint-plugin-oxlint
oxlint-migrate
mirrors-oxlint
mirrors-oxfmt
- name: Bump oxc-project/eslint-plugin-oxlint
uses: benc-uk/workflow-dispatch@d004979be141727c7a17c28f603e2facc40d0855 # v1.3.3
with:
repo: oxc-project/eslint-plugin-oxlint
workflow: bump_oxlint.yml
token: ${{ steps.app-token.outputs.token }}
ref: main
inputs: '{ "version": "${{ needs.check.outputs.oxlint_version }}" }'
- name: Bump oxc-project/oxlint-migrate
uses: benc-uk/workflow-dispatch@d004979be141727c7a17c28f603e2facc40d0855 # v1.3.3
with:
repo: oxc-project/oxlint-migrate
workflow: bump_oxlint.yml
token: ${{ steps.app-token.outputs.token }}
ref: main
inputs: '{ "version": "${{ needs.check.outputs.oxlint_version }}" }'
- name: Bump oxc-project/mirrors-oxlint
uses: benc-uk/workflow-dispatch@d004979be141727c7a17c28f603e2facc40d0855 # v1.3.3
with:
repo: oxc-project/mirrors-oxlint
workflow: main.yml
token: ${{ steps.app-token.outputs.token }}
ref: main
- name: Bump oxc-project/mirrors-oxfmt
uses: benc-uk/workflow-dispatch@d004979be141727c7a17c28f603e2facc40d0855 # v1.3.3
with:
repo: oxc-project/mirrors-oxfmt
workflow: main.yml
token: ${{ steps.app-token.outputs.token }}
ref: main