fix: disable pnpm cache so it always install based on npm_config_arch

This commit is contained in:
linonetwo 2024-07-17 21:39:55 +08:00
parent b1c966da33
commit ee7f34b1b2

View file

@ -48,14 +48,14 @@ jobs:
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
# disable pnpm cache so it always install based on npm_config_arch
# - uses: actions/cache@v3
# name: Setup pnpm cache
# with:
# path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
# key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
# restore-keys: |
# ${{ runner.os }}-pnpm-store-
# only run codeql on Linux
- name: Initialize CodeQL
@ -67,7 +67,7 @@ jobs:
run: pnpm install
env:
# for dugute, see node_modules/.pnpm/dugite@2.7.1/node_modules/dugite/script/config.js
npm_config_arch: linux-x64
npm_config_arch: x64
- name: Make Linux (x64)
run: pnpm run make:linux-x64
env:
@ -76,9 +76,9 @@ jobs:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Install dependencies (arm64)
run: pnpm install dugite
run: pnpm install dugite --force
env:
npm_config_arch: linux-arm64
npm_config_arch: arm64
- name: Make Linux (arm64)
run: pnpm run make:linux-arm
env:
@ -135,13 +135,13 @@ jobs:
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
# - uses: actions/cache@v3
# name: Setup pnpm 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: Remove buggy dependencies
run: pnpm remove registry-js
@ -149,7 +149,7 @@ jobs:
- name: Install dependencies (x64)
run: pnpm install
env:
npm_config_arch: darwin-x64
npm_config_arch: x64
- name: Make macOS (x64)
run: pnpm run make:mac-x64
env:
@ -160,9 +160,9 @@ jobs:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Install dependencies (arm64)
run: pnpm install dugite
run: pnpm install dugite --force
env:
npm_config_arch: darwin-arm64
npm_config_arch: arm64
- name: Make macOS (arm64)
run: pnpm run make:mac-arm
env:
@ -220,18 +220,18 @@ jobs:
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
# - uses: actions/cache@v3
# name: Setup pnpm 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 (x64)
run: pnpm install
env:
npm_config_arch: win32-x64
npm_config_arch: x64
# - name: Add msi to path
# run: echo "${env:wix}bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
# Enable x32 if someone still need it
@ -260,10 +260,10 @@ jobs:
# Get-ChildItem out/make/wix/x64
# Rename-Item -Path "out/make/wix/x64/TidGi.msi" -NewName "Install-TidGi-Windows-x64.msi"
- name: Install dependencies (arm64)
run: pnpm install dugite
run: pnpm install dugite --force
env:
# based on TiddlyGit-Desktop/node_modules/.pnpm/dugite@2.7.1/node_modules/dugite/script/config.js
npm_config_arch: win32-ia32
npm_config_arch: ia32
- name: Make Windows (arm64)
run: pnpm run make:win-arm
env: