Skip to content

Commit

Permalink
fix: use npm_config_arch in reinstall, for dugite postinstall script
Browse files Browse the repository at this point in the history
  • Loading branch information
linonetwo committed Jul 17, 2024
1 parent c5e5ed2 commit e56b8e7
Showing 1 changed file with 26 additions and 14 deletions.
40 changes: 26 additions & 14 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,24 +63,28 @@ jobs:
with:
languages: javascript

- name: Install dependencies
- name: Install dependencies (x64)
run: pnpm install

env:
# for dugute, see node_modules/.pnpm/[email protected]/node_modules/dugite/script/config.js
npm_config_arch: linux-x64
- name: Make Linux (x64)
run: pnpm run make:linux-x64
env:
CI: true
CI_PULL_REQUEST: ${{ github.event_name == 'pull_request' }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# for dugute, see node_modules/.pnpm/[email protected]/node_modules/dugite/script/config.js
npm_config_arch: linux-x64

- name: Install dependencies (arm64)
run: pnpm install dugite
env:
npm_config_arch: linux-arm64
- name: Make Linux (arm64)
run: pnpm run make:linux-arm
env:
CI: true
CI_PULL_REQUEST: ${{ github.event_name == 'pull_request' }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
npm_config_arch: linux-arm64

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
Expand Down Expand Up @@ -141,9 +145,11 @@ jobs:
- name: Remove buggy dependencies
run: pnpm remove registry-js
- name: Install dependencies
run: pnpm install

- name: Install dependencies (x64)
run: pnpm install
env:
npm_config_arch: darwin-x64
- name: Make macOS (x64)
run: pnpm run make:mac-x64
env:
Expand All @@ -152,7 +158,11 @@ jobs:
CI: true
CI_PULL_REQUEST: ${{ github.event_name == 'pull_request' }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
npm_config_arch: darwin-x64

- name: Install dependencies (arm64)
run: pnpm install dugite
env:
npm_config_arch: darwin-arm64
- name: Make macOS (arm64)
run: pnpm run make:mac-arm
env:
Expand All @@ -161,7 +171,6 @@ jobs:
CI: true
CI_PULL_REQUEST: ${{ github.event_name == 'pull_request' }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
npm_config_arch: darwin-arm64

- name: Create Release
uses: softprops/action-gh-release@v1
Expand Down Expand Up @@ -219,9 +228,10 @@ jobs:
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
- name: Install dependencies (x64)
run: pnpm install

env:
npm_config_arch: win32-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
Expand All @@ -245,11 +255,15 @@ jobs:
CI: true
CI_PULL_REQUEST: ${{ github.event_name == 'pull_request' }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
npm_config_arch: win32-x64
# - name: Rename (x64)
# run: |
# 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
env:
# based on TiddlyGit-Desktop/node_modules/.pnpm/[email protected]/node_modules/dugite/script/config.js
npm_config_arch: win32-ia32
- name: Make Windows (arm64)
run: pnpm run make:win-arm
env:
Expand All @@ -258,8 +272,6 @@ jobs:
CI: true
CI_PULL_REQUEST: ${{ github.event_name == 'pull_request' }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# based on TiddlyGit-Desktop/node_modules/.pnpm/[email protected]/node_modules/dugite/script/config.js
npm_config_arch: win32-ia32
# - name: Rename (arm64)
# run: |
# Get-ChildItem out/make/wix/arm64
Expand Down

0 comments on commit e56b8e7

Please sign in to comment.