mirror of
https://gitee.com/tuxmonkey/Helix
synced 2026-10-24 02:52:20 +08:00
Add macOS/Linux build targets and update CI for all platforms
This commit is contained in:
55
.github/workflows/build.yml
vendored
55
.github/workflows/build.yml
vendored
@@ -1,4 +1,4 @@
|
|||||||
name: Build Windows
|
name: Build All Platforms
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
@@ -8,25 +8,60 @@ on:
|
|||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build-windows:
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 24
|
node-version: 24
|
||||||
cache: npm
|
cache: npm
|
||||||
|
|
||||||
- run: npm ci
|
- run: npm ci
|
||||||
|
- run: npx electron-builder --win
|
||||||
- run: npx electron-builder --win portable
|
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: Helix-portable
|
name: Helix-Windows
|
||||||
path: dist/Helix*.exe
|
path: |
|
||||||
|
dist/Helix Setup *.exe
|
||||||
|
dist/Helix *.exe
|
||||||
|
if-no-files-found: error
|
||||||
|
|
||||||
|
build-macos:
|
||||||
|
runs-on: macos-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: 24
|
||||||
|
cache: npm
|
||||||
|
- run: npm ci
|
||||||
|
- run: npx electron-builder --mac
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
- uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: Helix-macOS
|
||||||
|
path: dist/*.dmg
|
||||||
|
if-no-files-found: error
|
||||||
|
|
||||||
|
build-linux:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: 24
|
||||||
|
cache: npm
|
||||||
|
- run: npm ci
|
||||||
|
- run: npx electron-builder --linux
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
- uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: Helix-Linux
|
||||||
|
path: |
|
||||||
|
dist/*.AppImage
|
||||||
|
dist/*.deb
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|||||||
27
package.json
27
package.json
@@ -7,8 +7,10 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "electron .",
|
"start": "electron .",
|
||||||
"dev": "electron . --dev",
|
"dev": "electron . --dev",
|
||||||
"build": "electron-builder --win",
|
"build:win": "electron-builder --win",
|
||||||
"build:portable": "electron-builder --win portable"
|
"build:mac": "electron-builder --mac",
|
||||||
|
"build:linux": "electron-builder --linux",
|
||||||
|
"build:all": "electron-builder --win --mac --linux"
|
||||||
},
|
},
|
||||||
"build": {
|
"build": {
|
||||||
"appId": "com.helix.git",
|
"appId": "com.helix.git",
|
||||||
@@ -24,13 +26,26 @@
|
|||||||
],
|
],
|
||||||
"win": {
|
"win": {
|
||||||
"target": [
|
"target": [
|
||||||
{
|
{ "target": "nsis", "arch": ["x64"] },
|
||||||
"target": "nsis",
|
{ "target": "portable", "arch": ["x64"] }
|
||||||
"arch": ["x64"]
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
"icon": null
|
"icon": null
|
||||||
},
|
},
|
||||||
|
"mac": {
|
||||||
|
"target": [
|
||||||
|
{ "target": "dmg", "arch": ["x64", "arm64"] }
|
||||||
|
],
|
||||||
|
"category": "public.app-category.developer-tools",
|
||||||
|
"icon": null
|
||||||
|
},
|
||||||
|
"linux": {
|
||||||
|
"target": [
|
||||||
|
{ "target": "AppImage", "arch": ["x64"] },
|
||||||
|
{ "target": "deb", "arch": ["x64"] }
|
||||||
|
],
|
||||||
|
"category": "Development",
|
||||||
|
"icon": null
|
||||||
|
},
|
||||||
"nsis": {
|
"nsis": {
|
||||||
"oneClick": false,
|
"oneClick": false,
|
||||||
"perMachine": false,
|
"perMachine": false,
|
||||||
|
|||||||
Reference in New Issue
Block a user