From e0eb73bbafe854faa955e7bb9ae61aaee2311568 Mon Sep 17 00:00:00 2001 From: viarotel Date: Mon, 28 Oct 2024 17:00:53 +0800 Subject: [PATCH] =?UTF-8?q?ci:=20=F0=9F=94=A7=20Update=20ci?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release-assets.yml | 13 +++++++++---- .npmrc | 9 +++------ .npmrc.CN | 8 ++++++++ 3 files changed, 20 insertions(+), 10 deletions(-) create mode 100644 .npmrc.CN diff --git a/.github/workflows/release-assets.yml b/.github/workflows/release-assets.yml index 6b6774b..1646f06 100644 --- a/.github/workflows/release-assets.yml +++ b/.github/workflows/release-assets.yml @@ -27,24 +27,29 @@ jobs: with: node-version: 20 + - name: Enable corepack and pnpm + run: | + corepack enable + corepack prepare pnpm@latest --activate + - name: Install Dependencies - run: npm install + run: pnpm install - name: build-linux if: matrix.os == 'ubuntu-latest' - run: npm run build:linux + run: pnpm build:linux env: GH_TOKEN: ${{ secrets.GH_TOKEN }} - name: build-mac if: matrix.os == 'macos-latest' - run: npm run build:mac + run: pnpm build:mac env: GH_TOKEN: ${{ secrets.GH_TOKEN }} - name: build-win if: matrix.os == 'windows-latest' - run: npm run build:win + run: pnpm build:win env: GH_TOKEN: ${{ secrets.GH_TOKEN }} diff --git a/.npmrc b/.npmrc index 17916b5..2a17709 100644 --- a/.npmrc +++ b/.npmrc @@ -1,7 +1,4 @@ -registry=https://registry.npmmirror.com/ -shamefully-hoist=true -virtual-store-dir-max-length=70 +# 国内用户如果遇到无法安装依赖的情况,请将 .npmrc.CN 中的配置覆盖到本文件中 -ELECTRON_MIRROR=https://npmmirror.com/mirrors/electron/ -ELECTRON_CUSTOM_DIR="{{ version }}" -ELECTRON_BUILDER_BINARIES_MIRROR=https://npmmirror.com/mirrors/electron-builder-binaries/ \ No newline at end of file +shamefully-hoist=true +virtual-store-dir-max-length=70 \ No newline at end of file diff --git a/.npmrc.CN b/.npmrc.CN new file mode 100644 index 0000000..beae638 --- /dev/null +++ b/.npmrc.CN @@ -0,0 +1,8 @@ +shamefully-hoist=true +virtual-store-dir-max-length=70 + + +registry=https://registry.npmmirror.com/ +ELECTRON_MIRROR=https://npmmirror.com/mirrors/electron/ +ELECTRON_CUSTOM_DIR="{{ version }}" +ELECTRON_BUILDER_BINARIES_MIRROR=https://npmmirror.com/mirrors/electron-builder-binaries/ \ No newline at end of file