mirror of
https://github.com/tiddly-gittly/TidGi-Desktop.git
synced 2025-12-06 02:30:47 -08:00
fix: use npm instead of pnpm again
This commit is contained in:
parent
45eeab17b4
commit
b4929a3330
4 changed files with 3009 additions and 13020 deletions
49
.github/workflows/release.yml
vendored
49
.github/workflows/release.yml
vendored
|
|
@ -39,27 +39,10 @@ jobs:
|
||||||
- name: Set up Node.js
|
- name: Set up Node.js
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: 16.x
|
node-version: 18.x
|
||||||
- name: Install pnpm
|
|
||||||
uses: pnpm/action-setup@v2
|
|
||||||
with:
|
|
||||||
version: latest
|
|
||||||
- name: Get pnpm store directory
|
|
||||||
id: pnpm-cache
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
|
|
||||||
- name: Get npm cache directory
|
|
||||||
uses: actions/cache@v3
|
|
||||||
id: cache
|
|
||||||
with:
|
|
||||||
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
|
|
||||||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-pnpm-store-
|
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: pnpm i
|
run: npm ci --legacy-peer-deps
|
||||||
|
|
||||||
- name: Make Linux (x64)
|
- name: Make Linux (x64)
|
||||||
run: npm run make:linux-x64
|
run: npm run make:linux-x64
|
||||||
|
|
@ -109,27 +92,10 @@ jobs:
|
||||||
- name: Set up Node.js
|
- name: Set up Node.js
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: 16.x
|
node-version: 18.x
|
||||||
- name: Install pnpm
|
|
||||||
uses: pnpm/action-setup@v2
|
|
||||||
with:
|
|
||||||
version: latest
|
|
||||||
- name: Get pnpm store directory
|
|
||||||
id: pnpm-cache
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
|
|
||||||
- name: Get npm cache directory
|
|
||||||
uses: actions/cache@v3
|
|
||||||
id: cache
|
|
||||||
with:
|
|
||||||
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
|
|
||||||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-pnpm-store-
|
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: pnpm i
|
run: npm ci --legacy-peer-deps
|
||||||
|
|
||||||
- name: Make macOS (x64)
|
- name: Make macOS (x64)
|
||||||
run: npm run make:mac-x64
|
run: npm run make:mac-x64
|
||||||
|
|
@ -186,10 +152,7 @@ jobs:
|
||||||
- name: Set up Node.js
|
- name: Set up Node.js
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: 16.x
|
node-version: 18.x
|
||||||
- uses: pnpm/action-setup@v2
|
|
||||||
with:
|
|
||||||
version: latest
|
|
||||||
# wait for https://github.com/actions/cache/issues/988
|
# wait for https://github.com/actions/cache/issues/988
|
||||||
# - name: Get npm cache directory
|
# - name: Get npm cache directory
|
||||||
# id: npm-cache
|
# id: npm-cache
|
||||||
|
|
@ -204,7 +167,7 @@ jobs:
|
||||||
# ${{ runner.os }}-node-
|
# ${{ runner.os }}-node-
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: pnpm i
|
run: npm ci --legacy-peer-deps
|
||||||
|
|
||||||
- name: Add msi to path
|
- name: Add msi to path
|
||||||
run: echo "${env:wix}bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
run: echo "${env:wix}bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
||||||
|
|
|
||||||
4482
package-lock.json
generated
4482
package-lock.json
generated
File diff suppressed because it is too large
Load diff
11488
pnpm-lock.yaml
generated
11488
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load diff
|
|
@ -46,13 +46,15 @@ exports.default = async (buildPath, electronVersion, platform, arch, callback) =
|
||||||
// await exec(`npm i --legacy-building`, { cwd: path.join(cwd, 'node_modules', 'app-path', 'node_modules', 'cross-spawn') });
|
// await exec(`npm i --legacy-building`, { cwd: path.join(cwd, 'node_modules', 'app-path', 'node_modules', 'cross-spawn') });
|
||||||
// await exec(`npm i --legacy-building`, { cwd: path.join(cwd, 'node_modules', 'app-path', 'node_modules', 'get-stream') });
|
// await exec(`npm i --legacy-building`, { cwd: path.join(cwd, 'node_modules', 'app-path', 'node_modules', 'get-stream') });
|
||||||
await fs.copy(path.join(projectRoot, 'node_modules', 'zx'), path.join(cwd, 'node_modules', 'zx'));
|
await fs.copy(path.join(projectRoot, 'node_modules', 'zx'), path.join(cwd, 'node_modules', 'zx'));
|
||||||
await exec(`npm i --legacy-building`, { cwd: path.join(cwd, 'node_modules', 'zx'), shell });
|
// not using pnpm, because after using it, it always causing problem here, causing `Error: spawn /bin/sh ENOENT` in github actions
|
||||||
await exec(`npm i --legacy-building`, { cwd: path.join(cwd, 'node_modules', 'zx', 'node_modules', 'globby'), shell });
|
// it can probably being "working directory didn't exist" in https://github.com/nodejs/node/issues/9644#issuecomment-282060923
|
||||||
await exec(`npm i --legacy-building --ignore-scripts`, { cwd: path.join(cwd, 'node_modules', 'zx', 'node_modules', 'node-fetch'), shell });
|
await exec(`npm i --legacy-building`, { cwd: path.join(cwd, 'node_modules', 'zx') });
|
||||||
|
await exec(`npm i --legacy-building`, { cwd: path.join(cwd, 'node_modules', 'zx', 'node_modules', 'globby') });
|
||||||
|
await exec(`npm i --legacy-building --ignore-scripts`, { cwd: path.join(cwd, 'node_modules', 'zx', 'node_modules', 'node-fetch') });
|
||||||
}
|
}
|
||||||
/** sign it for mac m1 https://www.zhihu.com/question/431722091/answer/1592339574 */
|
/** sign it for mac m1 https://www.zhihu.com/question/431722091/answer/1592339574 */
|
||||||
if (platform === 'darwin') {
|
if (platform === 'darwin') {
|
||||||
await exec(`xattr -rd com.apple.quarantine ${appPath}`, { cwd: appParentPath, shell });
|
await exec(`xattr -rd com.apple.quarantine ${appPath}`, { cwd: appParentPath });
|
||||||
}
|
}
|
||||||
/** complete this hook */
|
/** complete this hook */
|
||||||
callback();
|
callback();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue