From 947a5106461d513f4c75ccaa7208f188481e8059 Mon Sep 17 00:00:00 2001 From: Max Litruv Boonzaayer Date: Wed, 12 Nov 2025 06:27:39 +1100 Subject: [PATCH] linux building --- .github/workflows/build-all.yml | 92 +++++++++++++++++++++++++++++++ .github/workflows/build-linux.yml | 66 ++++++++++++++++++++++ package.json | 25 +++++++++ 3 files changed, 183 insertions(+) create mode 100644 .github/workflows/build-all.yml create mode 100644 .github/workflows/build-linux.yml diff --git a/.github/workflows/build-all.yml b/.github/workflows/build-all.yml new file mode 100644 index 0000000..d5ea497 --- /dev/null +++ b/.github/workflows/build-all.yml @@ -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 }} diff --git a/.github/workflows/build-linux.yml b/.github/workflows/build-linux.yml new file mode 100644 index 0000000..9996863 --- /dev/null +++ b/.github/workflows/build-linux.yml @@ -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 }} diff --git a/package.json b/package.json index c04322f..723040e 100644 --- a/package.json +++ b/package.json @@ -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",