Skip to content
This repository has been archived by the owner on Feb 5, 2025. It is now read-only.

Commit

Permalink
support windows7
Browse files Browse the repository at this point in the history
  • Loading branch information
pompurin404 committed Sep 14, 2024
1 parent 1d20840 commit 9b26128
Show file tree
Hide file tree
Showing 4 changed files with 165 additions and 98 deletions.
66 changes: 66 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,72 @@ jobs:
body_path: changelog.md
token: ${{ secrets.GITHUB_TOKEN }}

windows7:
strategy:
fail-fast: false
matrix:
arch:
- x64
- ia32
- arm64
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Nodejs
uses: actions/setup-node@v4
with:
node-version: 22
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- name: Install Dependencies
env:
npm_config_arch: ${{ matrix.arch }}
npm_config_target_arch: ${{ matrix.arch }}
run: |
pnpm install
pnpm add @mihomo-party/sysproxy-win32-${{ matrix.arch }}-msvc
pnpm add -D electron@22.3.27
(Get-Content electron-builder.yml) -replace 'windows', 'win7' | Set-Content electron-builder.yml
pnpm prepare --${{ matrix.arch }}
- name: Build
env:
npm_config_arch: ${{ matrix.arch }}
npm_config_target_arch: ${{ matrix.arch }}
run: pnpm build:win --${{ matrix.arch }}
- name: Add Portable Flag
run: |
New-Item -Path "PORTABLE" -ItemType File
Get-ChildItem dist/*portable.7z | ForEach-Object {
7z a $_.FullName PORTABLE
}
- name: Generate checksums
run: pnpm checksum setup.exe portable.7z
- name: Upload Artifacts
if: startsWith(github.ref, 'refs/heads/')
uses: actions/upload-artifact@v4
with:
name: Win7 ${{ matrix.arch }}
path: |
dist/*.sha256
dist/*setup.exe
dist/*portable.7z
if-no-files-found: error
- name: Publish Release
if: startsWith(github.ref, 'refs/tags/v')
uses: softprops/action-gh-release@v2
with:
files: |
dist/*.sha256
dist/*setup.exe
dist/*portable.7z
body_path: changelog.md
token: ${{ secrets.GITHUB_TOKEN }}

linux:
strategy:
fail-fast: false
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"dependencies": {
"@electron-toolkit/preload": "^3.0.1",
"@electron-toolkit/utils": "^3.0.0",
"@mihomo-party/sysproxy": "^2.0.3",
"@mihomo-party/sysproxy": "^2.0.4",
"adm-zip": "^0.5.16",
"axios": "^1.7.7",
"chokidar": "^3.6.0",
Expand All @@ -45,7 +45,7 @@
"@nextui-org/react": "^2.4.6",
"@types/adm-zip": "^0.5.5",
"@types/express": "^4.17.21",
"@types/node": "^22.5.4",
"@types/node": "^22.5.5",
"@types/pubsub-js": "^1.8.6",
"@types/react": "^18.3.5",
"@types/react-dom": "^18.3.0",
Expand All @@ -54,7 +54,7 @@
"autoprefixer": "^10.4.20",
"cron-validator": "^1.3.1",
"driver.js": "^1.3.1",
"electron": "^32.1.0",
"electron": "^22.3.27",
"electron-builder": "^25.0.5",
"electron-vite": "^2.3.0",
"electron-window-state": "^5.0.3",
Expand Down
Loading

0 comments on commit 9b26128

Please sign in to comment.