linux building

This commit is contained in:
2025-11-12 06:27:39 +11:00
parent 343efc18ed
commit 947a510646
3 changed files with 183 additions and 0 deletions

92
.github/workflows/build-all.yml vendored Normal file
View File

@@ -0,0 +1,92 @@
name: Build All Platforms
on:
push:
branches: [main]
tags:
- 'v*'
pull_request:
branches: [main]
workflow_dispatch:
jobs:
build-windows:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build Windows
run: npm run dist:win
- name: Upload Windows artifacts
uses: actions/upload-artifact@v4
with:
name: windows-installer
path: release/*.exe
build-linux:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build Linux
run: npm run dist:linux
- name: Upload Linux artifacts
uses: actions/upload-artifact@v4
with:
name: linux-packages
path: |
release/*.AppImage
release/*.deb
release/*.rpm
release/*.snap
release:
needs: [build-windows, build-linux]
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Download Windows artifacts
uses: actions/download-artifact@v4
with:
name: windows-installer
- name: Download Linux artifacts
uses: actions/download-artifact@v4
with:
name: linux-packages
- name: Create Release
uses: softprops/action-gh-release@v1
with:
files: |
*.exe
*.AppImage
*.deb
*.rpm
*.snap
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

66
.github/workflows/build-linux.yml vendored Normal file
View File

@@ -0,0 +1,66 @@
name: Build Linux
on:
push:
branches: [main]
tags:
- 'v*'
pull_request:
branches: [main]
workflow_dispatch:
jobs:
build-linux:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build Linux packages
run: npm run dist:linux
- name: Upload AppImage
uses: actions/upload-artifact@v4
with:
name: linux-appimage
path: release/*.AppImage
- name: Upload DEB
uses: actions/upload-artifact@v4
with:
name: linux-deb
path: release/*.deb
- name: Upload RPM
uses: actions/upload-artifact@v4
with:
name: linux-rpm
path: release/*.rpm
- name: Upload Snap
uses: actions/upload-artifact@v4
with:
name: linux-snap
path: release/*.snap
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
release/*.AppImage
release/*.deb
release/*.rpm
release/*.snap
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -18,6 +18,7 @@
"pack": "npm run build && electron-builder --dir",
"dist": "npm run build && electron-builder",
"dist:win": "npm run build && electron-builder --win",
"dist:linux": "npm run build && electron-builder --linux",
"postinstall": "patch-package"
},
"dependencies": {
@@ -67,6 +68,30 @@
"oneClick": false,
"allowToChangeInstallationDirectory": true
},
"linux": {
"target": [
"AppImage",
"deb",
"rpm",
"snap"
],
"icon": "build/icon.png",
"category": "AudioVideo",
"description": "Audio sorting and management application",
"mimeTypes": [
"audio/wav",
"audio/x-wav"
]
},
"snap": {
"summary": "Audio sorting and management application",
"plugs": [
"default",
"audio-playback",
"home",
"removable-media"
]
},
"extraResources": [
{
"from": "data/UCS.csv",