From 7f0753781d1e2e0f259934acc7321bd430dab046 Mon Sep 17 00:00:00 2001 From: Cipher Vance Date: Sun, 25 Jan 2026 09:59:27 -0600 Subject: [PATCH] add build of executables --- .github/workflows/build.yml | 117 ++++++++++++++++++++++++++++++++++++ package.json | 4 +- 2 files changed, 120 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..8a5274a --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,117 @@ +name: Build and Release + +on: + push: + branches: + - main + tags: + - 'v*' + pull_request: + branches: + - main + workflow_dispatch: + +jobs: + build: + name: Build ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, macos-latest, 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 Vite app + run: npm run build + + - name: Build Electron app (Windows) + if: matrix.os == 'windows-latest' + run: npm run electron:build:win + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Build Electron app (macOS) + if: matrix.os == 'macos-latest' + run: npm run electron:build:mac + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Build Electron app (Linux) + if: matrix.os == 'ubuntu-latest' + run: npm run electron:build:linux + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Upload Windows artifacts + if: matrix.os == 'windows-latest' + uses: actions/upload-artifact@v4 + with: + name: windows-installers + path: | + release/*.exe + retention-days: 30 + + - name: Upload macOS artifacts + if: matrix.os == 'macos-latest' + uses: actions/upload-artifact@v4 + with: + name: macos-installers + path: | + release/*.dmg + release/*.zip + retention-days: 30 + + - name: Upload Linux artifacts + if: matrix.os == 'ubuntu-latest' + uses: actions/upload-artifact@v4 + with: + name: linux-installers + path: | + release/*.AppImage + release/*.deb + release/*.rpm + retention-days: 30 + + release: + name: Create Release + needs: build + runs-on: ubuntu-latest + if: startsWith(github.ref, 'refs/tags/v') + permissions: + contents: write + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Download all artifacts + uses: actions/download-artifact@v4 + with: + path: artifacts + + - name: Display structure of downloaded files + run: ls -R artifacts + + - name: Create Release + uses: softprops/action-gh-release@v1 + with: + draft: false + prerelease: false + generate_release_notes: true + files: | + artifacts/windows-installers/* + artifacts/macos-installers/* + artifacts/linux-installers/* + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/package.json b/package.json index 4157e9c..fe82947 100644 --- a/package.json +++ b/package.json @@ -79,7 +79,9 @@ }, "linux": { "target": [ - "AppImage" + "AppImage", + "deb", + "rpm" ], "icon": "build/icon.png", "category": "Utility"