mirror of
https://github.com/oxc-project/oxc.git
synced 2026-09-14 19:36:11 +08:00
6f22859717
## 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.
110 lines
4.0 KiB
YAML
110 lines
4.0 KiB
YAML
name: Prepare Release Apps
|
|
|
|
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:
|
|
prepare:
|
|
if: github.repository == 'oxc-project/oxc'
|
|
name: Prepare Release
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
pull-request-number: ${{ steps.pr.outputs.pull-request-number }}
|
|
oxlint_version: ${{ steps.run.outputs.OXLINT_VERSION }}
|
|
oxfmt_version: ${{ steps.run.outputs.OXFMT_VERSION }}
|
|
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
|
|
|
|
- uses: oxc-project/setup-node@f46a72f95efdc55273fcd042d61c84e723b2892c # v1.4.1
|
|
|
|
- name: Generate version and changelog
|
|
id: run
|
|
run: |
|
|
mkdir -p target
|
|
cargo release-oxc update --changelog --release oxlint --release oxfmt
|
|
echo "OXLINT_VERSION=$(cat ./target/OXLINT_VERSION)" >> $GITHUB_OUTPUT
|
|
echo "OXFMT_VERSION=$(cat ./target/OXFMT_VERSION)" >> $GITHUB_OUTPUT
|
|
{
|
|
echo "# Oxlint"
|
|
cat ./target/OXLINT_CHANGELOG
|
|
echo ""
|
|
echo "# Oxfmt"
|
|
cat ./target/OXFMT_CHANGELOG
|
|
} > ./target/PR_BODY.md
|
|
|
|
- name: Rewrite rule versions
|
|
env:
|
|
OXLINT_VERSION: ${{ steps.run.outputs.OXLINT_VERSION }}
|
|
run: node .github/scripts/update-rule-versions.mts --release-version "$OXLINT_VERSION" --write
|
|
|
|
- name: Rebuild NAPI bindings
|
|
run: |
|
|
pnpm --filter oxlint-app run build-dev
|
|
pnpm --filter oxfmt-app 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(apps): oxlint v${{ steps.run.outputs.OXLINT_VERSION }} && oxfmt v${{ steps.run.outputs.OXFMT_VERSION }}"
|
|
title: "release(apps): oxlint v${{ steps.run.outputs.OXLINT_VERSION }} && oxfmt v${{ steps.run.outputs.OXFMT_VERSION }}"
|
|
branch: release/apps
|
|
branch-suffix: timestamp
|
|
base: main
|
|
body-path: ./target/PR_BODY.md
|
|
assignees: Boshen
|
|
labels: |
|
|
run-oxlint-ecosystem-ci
|
|
run-oxfmt-ecosystem-ci
|
|
|
|
website:
|
|
needs: prepare
|
|
name: Update oxc.rs
|
|
runs-on: ubuntu-slim
|
|
permissions:
|
|
actions: write
|
|
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 }}
|
|
owner: oxc-project
|
|
repositories: website
|
|
- uses: benc-uk/workflow-dispatch@31e2b3319479a63f0ab15bf800eff9e913504e26 # v1.3.2
|
|
with:
|
|
repo: oxc-project/website
|
|
workflow: release.yml
|
|
token: ${{ steps.app-token.outputs.token }}
|
|
ref: main
|
|
inputs: '{ "issue-number": "${{ needs.prepare.outputs.pull-request-number }}", "version": "${{ needs.prepare.outputs.oxlint_version }}" }'
|