mirror of
https://github.com/Kuingsmile/PicList.git
synced 2026-05-07 06:12:52 +08:00
📦 Chore(custom): add arm64 build test
This commit is contained in:
7
.github/workflows/main.yml
vendored
7
.github/workflows/main.yml
vendored
@@ -6,9 +6,6 @@ name: Auto Build
|
||||
# Workflow's trigger
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- release
|
||||
|
||||
env:
|
||||
ELECTRON_OUTPUT_PATH: ./dist_electron
|
||||
@@ -17,7 +14,7 @@ env:
|
||||
|
||||
jobs:
|
||||
release:
|
||||
name: build and release electron app
|
||||
name: Build
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
@@ -33,7 +30,7 @@ jobs:
|
||||
git config --global core.autocrlf false
|
||||
|
||||
- name: Check out git repository
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v4
|
||||
|
||||
# step2: sign
|
||||
- name: Install the Apple certificates
|
||||
|
||||
59
.github/workflows/test-build.yml
vendored
59
.github/workflows/test-build.yml
vendored
@@ -21,7 +21,7 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-13, windows-latest]
|
||||
os: [ubuntu-latest, macos-13, windows-latest, windows-11-arm]
|
||||
|
||||
steps:
|
||||
- name: Set up git config
|
||||
@@ -49,11 +49,17 @@ jobs:
|
||||
yarn install
|
||||
npm rebuild --platform=darwin --arch=arm64 sharp
|
||||
|
||||
- name: Install dependencies (Windows)
|
||||
- name: Install dependencies (Windows x64)
|
||||
if: matrix.os == 'windows-latest'
|
||||
run: |
|
||||
yarn config set ignore-engines true
|
||||
yarn install
|
||||
|
||||
- name: Install dependencies (Windows ARM64)
|
||||
if: matrix.os == 'windows-11-arm'
|
||||
run: |
|
||||
yarn config set ignore-engines true
|
||||
yarn install
|
||||
|
||||
- name: Install dependencies (Linux)
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
@@ -61,8 +67,32 @@ jobs:
|
||||
yarn config set ignore-engines true
|
||||
yarn install
|
||||
|
||||
- name: Build application (Windows)
|
||||
- name: Modify electron-builder.json for Windows x64
|
||||
if: matrix.os == 'windows-latest'
|
||||
run: |
|
||||
# Remove arm64 from the arch array, keep only x64
|
||||
$config = Get-Content electron-builder.json | ConvertFrom-Json
|
||||
$config.win.target[0].arch = @("x64")
|
||||
$config | ConvertTo-Json -Depth 10 | Set-Content electron-builder.json
|
||||
|
||||
- name: Modify electron-builder.json for Windows ARM64
|
||||
if: matrix.os == 'windows-11-arm'
|
||||
run: |
|
||||
# Remove x64 from the arch array, keep only arm64
|
||||
$config = Get-Content electron-builder.json | ConvertFrom-Json
|
||||
$config.win.target[0].arch = @("arm64")
|
||||
$config | ConvertTo-Json -Depth 10 | Set-Content electron-builder.json
|
||||
|
||||
- name: Build application (Windows x64)
|
||||
if: matrix.os == 'windows-latest'
|
||||
run: yarn build:win
|
||||
env:
|
||||
ELECTRON_SKIP_NOTARIZATION: true
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
||||
|
||||
- name: Build application (Windows ARM64)
|
||||
if: matrix.os == 'windows-11-arm'
|
||||
run: yarn build:win
|
||||
env:
|
||||
ELECTRON_SKIP_NOTARIZATION: true
|
||||
@@ -85,14 +115,23 @@ jobs:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
||||
|
||||
- name: Upload Windows executables with original names
|
||||
- name: Upload Windows x64 executables
|
||||
if: matrix.os == 'windows-latest'
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: windows-executables
|
||||
name: windows-x64-executables
|
||||
path: |
|
||||
dist_electron/PicList-Setup-*.exe
|
||||
retention-days: 30
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Upload Windows ARM64 executables
|
||||
if: matrix.os == 'windows-11-arm'
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: windows-arm64-executables
|
||||
path: |
|
||||
dist_electron/PicList-Setup-*.exe
|
||||
dist_electron/*.exe.blockmap
|
||||
retention-days: 30
|
||||
if-no-files-found: error
|
||||
|
||||
@@ -103,9 +142,6 @@ jobs:
|
||||
name: macos-packages
|
||||
path: |
|
||||
dist_electron/PicList-*.dmg
|
||||
dist_electron/PicList-*.zip
|
||||
dist_electron/*.dmg.blockmap
|
||||
dist_electron/*.zip.blockmap
|
||||
retention-days: 30
|
||||
if-no-files-found: error
|
||||
|
||||
@@ -116,9 +152,6 @@ jobs:
|
||||
name: linux-packages
|
||||
path: |
|
||||
dist_electron/PicList-*.AppImage
|
||||
dist_electron/PicList-*.snap
|
||||
dist_electron/PicList-*.deb
|
||||
dist_electron/PicList-*.rpm
|
||||
dist_electron/PicList-*.tar.gz
|
||||
dist_electron/*.snap
|
||||
retention-days: 30
|
||||
if-no-files-found: ignore
|
||||
|
||||
Reference in New Issue
Block a user