mirror of
https://github.com/SukkaW/Surge.git
synced 2025-12-14 02:00:37 +08:00
CI: use Node.js over bun
This commit is contained in:
parent
fc3ae52baa
commit
18d1c1b23e
15
.github/workflows/main.yml
vendored
15
.github/workflows/main.yml
vendored
@ -15,9 +15,15 @@ jobs:
|
|||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
- uses: oven-sh/setup-bun@v2
|
- uses: pnpm/action-setup@v4
|
||||||
|
name: Install pnpm
|
||||||
with:
|
with:
|
||||||
bun-version: canary
|
run_install: false
|
||||||
|
- name: Use Node.js
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version-file: '.node-version'
|
||||||
|
cache: 'pnpm'
|
||||||
- name: Get current date
|
- name: Get current date
|
||||||
id: date
|
id: date
|
||||||
run: |
|
run: |
|
||||||
@ -43,8 +49,9 @@ jobs:
|
|||||||
${{ runner.os }}-v3-${{ steps.date.outputs.year }}-${{ steps.date.outputs.month }}-
|
${{ runner.os }}-v3-${{ steps.date.outputs.year }}-${{ steps.date.outputs.month }}-
|
||||||
${{ runner.os }}-v3-${{ steps.date.outputs.year }}-
|
${{ runner.os }}-v3-${{ steps.date.outputs.year }}-
|
||||||
${{ runner.os }}-v3-
|
${{ runner.os }}-v3-
|
||||||
- run: bun install
|
- name: Install dependencies
|
||||||
- run: bun run build
|
run: pnpm install
|
||||||
|
- run: pnpm run build
|
||||||
- name: Pre-deploy check
|
- name: Pre-deploy check
|
||||||
# If the public directory doesn't exist, the build should fail.
|
# If the public directory doesn't exist, the build should fail.
|
||||||
# If the public directory is empty, the build should fail.
|
# If the public directory is empty, the build should fail.
|
||||||
|
|||||||
1
.node-version
Normal file
1
.node-version
Normal file
@ -0,0 +1 @@
|
|||||||
|
20
|
||||||
@ -8,9 +8,9 @@
|
|||||||
"url": "git+https://github.com/SukkaW/Surge.git"
|
"url": "git+https://github.com/SukkaW/Surge.git"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "bun ./Build/index.ts",
|
"build": "SWCRC=true ENABLE_TEXT_LINE_STREAM=true node -r @swc-node/register ./Build/index.ts",
|
||||||
"build-node": "SWCRC=true ENABLE_TEXT_LINE_STREAM=true node -r @swc-node/register ./Build/index.ts",
|
"build-bun": "bun ./Build/index.ts",
|
||||||
"build-stream": "ENABLE_TEXT_LINE_STREAM=true bun ./Build/index.ts",
|
"build-bun-stream": "ENABLE_TEXT_LINE_STREAM=true bun ./Build/index.ts",
|
||||||
"lint": "eslint --format=sukka ."
|
"lint": "eslint --format=sukka ."
|
||||||
},
|
},
|
||||||
"author": "",
|
"author": "",
|
||||||
@ -52,7 +52,7 @@
|
|||||||
"mitata": "^0.1.11",
|
"mitata": "^0.1.11",
|
||||||
"typescript": "^5.5.3"
|
"typescript": "^5.5.3"
|
||||||
},
|
},
|
||||||
"packageManager": "pnpm@9.5.0+sha512.140036830124618d624a2187b50d04289d5a087f326c9edfc0ccd733d76c4f52c3a313d4fc148794a2a9d81553016004e6742e8cf850670268a7387fc220c903",
|
"packageManager": "pnpm@9.6.0+sha512.38dc6fba8dba35b39340b9700112c2fe1e12f10b17134715a4aa98ccf7bb035e76fd981cf0bb384dfa98f8d6af5481c2bef2f4266a24bfa20c34eb7147ce0b5e",
|
||||||
"resolutions": {
|
"resolutions": {
|
||||||
"has": "npm:@nolyfill/has@latest"
|
"has": "npm:@nolyfill/has@latest"
|
||||||
}
|
}
|
||||||
|
|||||||
2729
pnpm-lock.yaml
generated
Normal file
2729
pnpm-lock.yaml
generated
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user