Files
oxc-project__oxc/.github/workflows/prepare_release_crates.yml
camc314 6f22859717 chore(deps): update setup-node to v1.4.1 (#26296)
## Summary

- update `oxc-project/setup-node` from v1.4.0 to v1.4.1 across all workflows
- pick up `pnpm/action-setup` v6.0.10, whose newer bootstrap fixes broken `@pnpm/exe` shims during package-manager self-updates

The setup action fix was released after oxc-project/setup-node#34.
2026-09-04 10:20:51 +00:00

92 lines
3.4 KiB
YAML

name: Prepare Release Crates
permissions: {}
on:
workflow_dispatch:
schedule:
# Triggers every Monday at 5pm Shanghai time (9am UTC)
- cron: "0 9 * * 1"
concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
jobs:
check:
if: github.repository == 'oxc-project/oxc'
name: Check
runs-on: ubuntu-latest
steps:
- uses: taiki-e/checkout-action@7d1e50e93dc4fb3bba58f85018fadf77898aee8b # v1.4.2
- uses: oxc-project/setup-rust@3d6fb132fbe7cdcb66bf8ec193911c2945369d12 # v1.0.17
with:
cache-key: warm
tools: cargo-release-oxc
- uses: oxc-project/setup-node@f46a72f95efdc55273fcd042d61c84e723b2892c # v1.4.1
- run: cargo ck
- run: cargo release-oxc publish --release crates --dry-run # zizmor: ignore[use-trusted-publishing]
- name: Check Codegen package
run: |
pnpm --filter oxc-codegen build
pnpm publish packages/codegen --dry-run --provenance --access public --no-git-checks
prepare:
if: github.repository == 'oxc-project/oxc'
name: Prepare Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
persist-credentials: false
- uses: oxc-project/setup-rust@3d6fb132fbe7cdcb66bf8ec193911c2945369d12 # v1.0.17
with:
cache-key: warm
tools: cargo-release-oxc
- name: Run
id: run
run: |
cargo ck
cargo release-oxc update --changelog --release crates
echo "CRATES_VERSION=$(cat ./target/CRATES_VERSION)" >> $GITHUB_OUTPUT
- uses: oxc-project/setup-node@f46a72f95efdc55273fcd042d61c84e723b2892c # v1.4.1
# Run NAPI-RS build, because NAPI-RS uses version from `package.json` in the bindings file,
# which is committed to the repo. The version has just been bumped in previous step.
# We don't use the compiled `.node` binary, so only do a development build, as it's faster.
- name: Rebuild NAPI packages bindings
run: |
pnpm --filter oxc-minify run build-dev
pnpm --filter oxc-parser run build-dev
pnpm --filter oxc-transform run build-dev
pnpm --filter oxc-transform-react run build-dev
pnpm --filter oxc-transform-relay run build-dev
- name: Update Cargo.lock
run: cargo check
- 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 }}
- uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1
id: pr
with:
# bot account with PAT required for triggering workflow runs
# See https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#triggering-further-workflow-runs
token: ${{ steps.app-token.outputs.token }}
commit-message: "release(crates): oxc v${{ steps.run.outputs.CRATES_VERSION }}"
title: "release(crates): oxc v${{ steps.run.outputs.CRATES_VERSION }}"
branch: release/crates
branch-suffix: timestamp
base: main
body-path: ./target/CRATES_CHANGELOG
assignees: Boshen
labels: run-monitor-oxc