mirror of
https://github.com/Kuingsmile/PicList.git
synced 2026-05-06 20:42:57 +08:00
📦 Chore(custom): update release action for arm64
This commit is contained in:
101
.github/workflows/main.yml
vendored
101
.github/workflows/main.yml
vendored
@@ -11,6 +11,7 @@ env:
|
|||||||
ELECTRON_OUTPUT_PATH: ./dist_electron
|
ELECTRON_OUTPUT_PATH: ./dist_electron
|
||||||
CSC_LINK: ${{ secrets.BUILD_CERTIFICATE_BASE64 }}
|
CSC_LINK: ${{ secrets.BUILD_CERTIFICATE_BASE64 }}
|
||||||
CSC_KEY_PASSWORD: ${{ secrets.P12_PASSWORD }}
|
CSC_KEY_PASSWORD: ${{ secrets.P12_PASSWORD }}
|
||||||
|
USE_HARD_LINKS: false
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
release:
|
||||||
@@ -21,7 +22,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, macos-13, windows-latest]
|
os: [ubuntu-latest, macos-13, windows-latest, windows-11-arm]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
@@ -73,6 +74,22 @@ jobs:
|
|||||||
yarn
|
yarn
|
||||||
yarn global add xvfb-maybe
|
yarn global add xvfb-maybe
|
||||||
|
|
||||||
|
- 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", "ia32")
|
||||||
|
$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 & release app
|
- name: Build & release app
|
||||||
run: |
|
run: |
|
||||||
yarn release
|
yarn release
|
||||||
@@ -92,3 +109,85 @@ jobs:
|
|||||||
P12_PASSWORD: ${{ secrets.P12_PASSWORD }}
|
P12_PASSWORD: ${{ secrets.P12_PASSWORD }}
|
||||||
BUILD_PROVISION_PROFILE_BASE64: ${{ secrets.BUILD_PROVISION_PROFILE_BASE64 }}
|
BUILD_PROVISION_PROFILE_BASE64: ${{ secrets.BUILD_PROVISION_PROFILE_BASE64 }}
|
||||||
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
|
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
|
||||||
|
USE_HARD_LINKS: false
|
||||||
|
|
||||||
|
- name: Upload Windows x64 executables
|
||||||
|
if: matrix.os == 'windows-latest'
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: windows-x64-executables
|
||||||
|
path: |
|
||||||
|
dist_electron/*
|
||||||
|
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/*
|
||||||
|
retention-days: 30
|
||||||
|
if-no-files-found: error
|
||||||
|
|
||||||
|
- name: Upload macOS packages
|
||||||
|
if: matrix.os == 'macos-13'
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: macos-packages
|
||||||
|
path: |
|
||||||
|
dist_electron/*
|
||||||
|
retention-days: 30
|
||||||
|
if-no-files-found: error
|
||||||
|
|
||||||
|
- name: Upload Linux packages
|
||||||
|
if: matrix.os == 'ubuntu-latest'
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: linux-packages
|
||||||
|
path: |
|
||||||
|
dist_electron/*
|
||||||
|
retention-days: 30
|
||||||
|
if-no-files-found: ignore
|
||||||
|
|
||||||
|
- name: Upload Windows x64 yml
|
||||||
|
if: matrix.os == 'windows-latest'
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: windows-x64-yml
|
||||||
|
path: |
|
||||||
|
dist_electron/github/*
|
||||||
|
retention-days: 30
|
||||||
|
if-no-files-found: error
|
||||||
|
|
||||||
|
- name: Upload Windows ARM64 yml
|
||||||
|
if: matrix.os == 'windows-11-arm'
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: windows-arm64-yml
|
||||||
|
path: |
|
||||||
|
dist_electron/github/*
|
||||||
|
retention-days: 30
|
||||||
|
if-no-files-found: error
|
||||||
|
|
||||||
|
- name: Upload macOS yml
|
||||||
|
if: matrix.os == 'macos-13'
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: macos-yml
|
||||||
|
path: |
|
||||||
|
dist_electron/github/*
|
||||||
|
retention-days: 30
|
||||||
|
if-no-files-found: error
|
||||||
|
|
||||||
|
- name: Upload Linux yml
|
||||||
|
if: matrix.os == 'ubuntu-latest'
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: linux-yml
|
||||||
|
path: |
|
||||||
|
dist_electron/github/*
|
||||||
|
retention-days: 30
|
||||||
|
if-no-files-found: ignore
|
||||||
|
|
||||||
|
|||||||
53
.github/workflows/test-build.yml
vendored
53
.github/workflows/test-build.yml
vendored
@@ -73,7 +73,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
# Remove arm64 from the arch array, keep only x64
|
# Remove arm64 from the arch array, keep only x64
|
||||||
$config = Get-Content electron-builder.json | ConvertFrom-Json
|
$config = Get-Content electron-builder.json | ConvertFrom-Json
|
||||||
$config.win.target[0].arch = @("x64")
|
$config.win.target[0].arch = @("x64", "ia32")
|
||||||
$config | ConvertTo-Json -Depth 10 | Set-Content electron-builder.json
|
$config | ConvertTo-Json -Depth 10 | Set-Content electron-builder.json
|
||||||
|
|
||||||
- name: Modify electron-builder.json for Windows ARM64
|
- name: Modify electron-builder.json for Windows ARM64
|
||||||
@@ -123,7 +123,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: windows-x64-executables
|
name: windows-x64-executables
|
||||||
path: |
|
path: |
|
||||||
dist_electron/PicList-Setup-*.exe
|
dist_electron/*
|
||||||
retention-days: 30
|
retention-days: 30
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
@@ -137,23 +137,62 @@ jobs:
|
|||||||
retention-days: 30
|
retention-days: 30
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
- name: Upload macOS packages with original names
|
- name: Upload macOS packages
|
||||||
if: matrix.os == 'macos-13'
|
if: matrix.os == 'macos-13'
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: macos-packages
|
name: macos-packages
|
||||||
path: |
|
path: |
|
||||||
dist_electron/PicList-*.dmg
|
dist_electron/*
|
||||||
retention-days: 30
|
retention-days: 30
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
- name: Upload Linux packages with original names
|
- name: Upload Linux packages
|
||||||
if: matrix.os == 'ubuntu-latest'
|
if: matrix.os == 'ubuntu-latest'
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: linux-packages
|
name: linux-packages
|
||||||
path: |
|
path: |
|
||||||
dist_electron/PicList-*.AppImage
|
dist_electron/*
|
||||||
dist_electron/*.snap
|
retention-days: 30
|
||||||
|
if-no-files-found: ignore
|
||||||
|
|
||||||
|
- name: Upload Windows x64 yml
|
||||||
|
if: matrix.os == 'windows-latest'
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: windows-x64-yml
|
||||||
|
path: |
|
||||||
|
dist_electron/github/*
|
||||||
|
retention-days: 30
|
||||||
|
if-no-files-found: error
|
||||||
|
|
||||||
|
- name: Upload Windows ARM64 yml
|
||||||
|
if: matrix.os == 'windows-11-arm'
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: windows-arm64-yml
|
||||||
|
path: |
|
||||||
|
dist_electron/github/*
|
||||||
|
retention-days: 30
|
||||||
|
if-no-files-found: error
|
||||||
|
|
||||||
|
- name: Upload macOS yml
|
||||||
|
if: matrix.os == 'macos-13'
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: macos-yml
|
||||||
|
path: |
|
||||||
|
dist_electron/github/*
|
||||||
|
retention-days: 30
|
||||||
|
if-no-files-found: error
|
||||||
|
|
||||||
|
- name: Upload Linux yml
|
||||||
|
if: matrix.os == 'ubuntu-latest'
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: linux-yml
|
||||||
|
path: |
|
||||||
|
dist_electron/github/*
|
||||||
retention-days: 30
|
retention-days: 30
|
||||||
if-no-files-found: ignore
|
if-no-files-found: ignore
|
||||||
|
|||||||
@@ -67,7 +67,7 @@
|
|||||||
"target": [
|
"target": [
|
||||||
{
|
{
|
||||||
"target": "nsis",
|
"target": "nsis",
|
||||||
"arch": ["x64", "arm64"]
|
"arch": ["x64", "ia32", "arm64"]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ const uploadFile = async () => {
|
|||||||
console.warn('platform not supported!', platform)
|
console.warn('platform not supported!', platform)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
let versionFileHasUploaded = false
|
let versionFileHasUploaded = true
|
||||||
for (const [index, config] of configList[platform].entries()) {
|
for (const [index, config] of configList[platform].entries()) {
|
||||||
const fileName = `${config.appNameWithPrefix}${VERSION}${config.arch}${config.ext}`
|
const fileName = `${config.appNameWithPrefix}${VERSION}${config.arch}${config.ext}`
|
||||||
const distPath = path.join(__dirname, '../dist_electron')
|
const distPath = path.join(__dirname, '../dist_electron')
|
||||||
|
|||||||
Reference in New Issue
Block a user