mirror of
https://github.com/koodo-reader/koodo-reader.git
synced 2026-06-22 23:02:30 -04:00
fix: update release workflow to include multiple OS targets and modify package.json for Linux x64 builds
This commit is contained in:
18
.github/workflows/release.yml
vendored
18
.github/workflows/release.yml
vendored
@@ -9,8 +9,7 @@ jobs:
|
||||
# Platforms to build on/for
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-24.04-arm]
|
||||
# os: [macos-latest, ubuntu-latest, windows-latest]
|
||||
os: [macos-latest, ubuntu-latest, windows-latest, ubuntu-24.04-arm]
|
||||
|
||||
steps:
|
||||
- name: Check out Git repository
|
||||
@@ -52,6 +51,21 @@ jobs:
|
||||
run: echo "USE_SYSTEM_FPM=true" >> $GITHUB_ENV
|
||||
- name: Set environment variable USE_HARD_LINKS
|
||||
run: echo "USE_HARD_LINKS=false" >> $GITHUB_ENV
|
||||
- name: Modify package.json for Linux arm64 build
|
||||
if: startsWith(matrix.os, 'ubuntu-24.04-arm')
|
||||
run: |
|
||||
$packageJson = Get-Content package.json -Raw | ConvertFrom-Json
|
||||
$packageJson.build.linux.target = @(
|
||||
@{
|
||||
target = "deb"
|
||||
arch = @("arm64")
|
||||
},
|
||||
@{
|
||||
target = "AppImage"
|
||||
arch = @("arm64")
|
||||
}
|
||||
)
|
||||
$packageJson | ConvertTo-Json -Depth 10 | Set-Content package.json
|
||||
- name: Build/release Electron app
|
||||
uses: samuelmeuli/action-electron-builder@v1.6.0
|
||||
with:
|
||||
|
||||
4
main.js
4
main.js
@@ -159,7 +159,7 @@ const createMainWin = () => {
|
||||
mainWin.loadURL(urlLocation);
|
||||
|
||||
mainWin.on("close", () => {
|
||||
if (!mainWin.isDestroyed()) {
|
||||
if (mainWin && !mainWin.isDestroyed()) {
|
||||
let bounds = mainWin.getBounds();
|
||||
if (bounds.width > 0 && bounds.height > 0) {
|
||||
store.set({
|
||||
@@ -233,7 +233,7 @@ const createMainWin = () => {
|
||||
readerWindow.setAlwaysOnTop(true);
|
||||
}
|
||||
readerWindow.on("close", (event) => {
|
||||
if (!readerWindow.isDestroyed()) {
|
||||
if (readerWindow && !readerWindow.isDestroyed()) {
|
||||
let bounds = readerWindow.getBounds();
|
||||
if (bounds.width > 0 && bounds.height > 0) {
|
||||
store.set({
|
||||
|
||||
16
package.json
16
package.json
@@ -267,16 +267,28 @@
|
||||
"icon": "assets/icons",
|
||||
"category": "Office",
|
||||
"target": [
|
||||
{
|
||||
"target": "snap",
|
||||
"arch": [
|
||||
"x64"
|
||||
]
|
||||
},
|
||||
{
|
||||
"target": "deb",
|
||||
"arch": [
|
||||
"arm64"
|
||||
"x64"
|
||||
]
|
||||
},
|
||||
{
|
||||
"target": "rpm",
|
||||
"arch": [
|
||||
"x64"
|
||||
]
|
||||
},
|
||||
{
|
||||
"target": "AppImage",
|
||||
"arch": [
|
||||
"arm64"
|
||||
"x64"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user