From ff761373390fc4b87c8f454c52a5f0cd34980e02 Mon Sep 17 00:00:00 2001 From: Karmaa <88517757+LukeGus@users.noreply.github.com> Date: Wed, 10 Sep 2025 21:27:51 -0500 Subject: [PATCH 1/3] Add GitHub Actions workflow for Electron app build --- .github/workflows/electron-build.yml | 139 +++++++++++++++++++++++++++ 1 file changed, 139 insertions(+) create mode 100644 .github/workflows/electron-build.yml diff --git a/.github/workflows/electron-build.yml b/.github/workflows/electron-build.yml new file mode 100644 index 00000000..46817692 --- /dev/null +++ b/.github/workflows/electron-build.yml @@ -0,0 +1,139 @@ +name: Build Electron App + +on: + push: + branches: + - development + paths-ignore: + - '**.md' + - '.gitignore' + - 'docker/**' + workflow_dispatch: + inputs: + build_type: + description: "Build type to run" + required: true + default: "all" + type: choice + options: + - all + - windows + - linux + +jobs: + build-windows: + runs-on: windows-latest + if: github.event.inputs.build_type == 'all' || github.event.inputs.build_type == 'windows' || github.event.inputs.build_type == '' + + steps: + - name: Checkout repository + uses: actions/checkout@v5 + with: + fetch-depth: 1 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + cache: 'npm' + + - name: Install dependencies + run: npm ci + + - name: Build Windows Portable + run: npm run build:win-portable + + - name: Build Windows Installer + run: npm run build:win-installer + + - name: Create Windows Portable zip + run: | + cd release/win-unpacked + Compress-Archive -Path * -DestinationPath ../Termix-Windows-Portable.zip + cd ../.. + + - name: Upload Windows Portable Artifact + uses: actions/upload-artifact@v4 + with: + name: Termix-Windows-Portable + path: release/Termix-Windows-Portable.zip + retention-days: 30 + + - name: Upload Windows Installer Artifact + uses: actions/upload-artifact@v4 + with: + name: Termix-Windows-Installer + path: release/*.exe + retention-days: 30 + + build-linux: + runs-on: ubuntu-latest + if: github.event.inputs.build_type == 'all' || github.event.inputs.build_type == 'linux' || github.event.inputs.build_type == '' + + steps: + - name: Checkout repository + uses: actions/checkout@v5 + with: + fetch-depth: 1 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + cache: 'npm' + + - name: Install dependencies + run: npm ci + + - name: Build Linux Portable + run: npm run build:linux-portable + + - name: Create Linux Portable zip + run: | + cd release/linux-unpacked + zip -r ../Termix-Linux-Portable.zip * + cd ../.. + + - name: Upload Linux Portable Artifact + uses: actions/upload-artifact@v4 + with: + name: Termix-Linux-Portable + path: release/Termix-Linux-Portable.zip + retention-days: 30 + + create-release: + if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/development') + needs: [build-windows, build-linux] + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v5 + + - name: Download all artifacts + uses: actions/download-artifact@v4 + with: + path: ./artifacts + + - name: Create Release + uses: softprops/action-gh-release@v2 + with: + tag_name: ${{ github.ref_name }}-${{ github.run_number }} + name: Termix ${{ github.ref_name }} Build ${{ github.run_number }} + body: | + ## Termix ${{ github.ref_name }} Build ${{ github.run_number }} + + ### Downloads + - **Windows Portable**: Download the zip file and extract to run Termix without installation + - **Windows Installer**: Run the .exe file to install Termix on your system + - **Linux Portable**: Download the zip file and extract to run Termix on Linux systems + + ### Changes + See the [commit history](https://github.com/${{ github.repository }}/compare/${{ github.event.before }}...${{ github.sha }}) for details. + files: | + artifacts/Termix-Windows-Portable/Termix-Windows-Portable.zip + artifacts/Termix-Windows-Installer/* + artifacts/Termix-Linux-Portable/Termix-Linux-Portable.zip + draft: false + prerelease: ${{ github.ref == 'refs/heads/development' }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 7756dc6a4c2ed88fe8a1c4d9c82e475fcfaa3a92 Mon Sep 17 00:00:00 2001 From: Karmaa <88517757+LukeGus@users.noreply.github.com> Date: Wed, 10 Sep 2025 21:30:14 -0500 Subject: [PATCH 2/3] Remove create-release job from workflow --- .github/workflows/electron-build.yml | 37 ---------------------------- 1 file changed, 37 deletions(-) diff --git a/.github/workflows/electron-build.yml b/.github/workflows/electron-build.yml index 46817692..cec1aadf 100644 --- a/.github/workflows/electron-build.yml +++ b/.github/workflows/electron-build.yml @@ -100,40 +100,3 @@ jobs: name: Termix-Linux-Portable path: release/Termix-Linux-Portable.zip retention-days: 30 - - create-release: - if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/development') - needs: [build-windows, build-linux] - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v5 - - - name: Download all artifacts - uses: actions/download-artifact@v4 - with: - path: ./artifacts - - - name: Create Release - uses: softprops/action-gh-release@v2 - with: - tag_name: ${{ github.ref_name }}-${{ github.run_number }} - name: Termix ${{ github.ref_name }} Build ${{ github.run_number }} - body: | - ## Termix ${{ github.ref_name }} Build ${{ github.run_number }} - - ### Downloads - - **Windows Portable**: Download the zip file and extract to run Termix without installation - - **Windows Installer**: Run the .exe file to install Termix on your system - - **Linux Portable**: Download the zip file and extract to run Termix on Linux systems - - ### Changes - See the [commit history](https://github.com/${{ github.repository }}/compare/${{ github.event.before }}...${{ github.sha }}) for details. - files: | - artifacts/Termix-Windows-Portable/Termix-Windows-Portable.zip - artifacts/Termix-Windows-Installer/* - artifacts/Termix-Linux-Portable/Termix-Linux-Portable.zip - draft: false - prerelease: ${{ github.ref == 'refs/heads/development' }} - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From d85fb26a5d563d1426218e3052515f531f67a4e8 Mon Sep 17 00:00:00 2001 From: Karmaa <88517757+LukeGus@users.noreply.github.com> Date: Wed, 10 Sep 2025 21:45:24 -0500 Subject: [PATCH 3/3] Update electron-build.yml --- .github/workflows/electron-build.yml | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/.github/workflows/electron-build.yml b/.github/workflows/electron-build.yml index cec1aadf..fb9e6004 100644 --- a/.github/workflows/electron-build.yml +++ b/.github/workflows/electron-build.yml @@ -48,15 +48,13 @@ jobs: - name: Create Windows Portable zip run: | - cd release/win-unpacked - Compress-Archive -Path * -DestinationPath ../Termix-Windows-Portable.zip - cd ../.. + Compress-Archive -Path "release/win-unpacked/*" -DestinationPath "Termix-Windows-Portable.zip" - name: Upload Windows Portable Artifact uses: actions/upload-artifact@v4 with: name: Termix-Windows-Portable - path: release/Termix-Windows-Portable.zip + path: Termix-Windows-Portable.zip retention-days: 30 - name: Upload Windows Installer Artifact @@ -90,13 +88,11 @@ jobs: - name: Create Linux Portable zip run: | - cd release/linux-unpacked - zip -r ../Termix-Linux-Portable.zip * - cd ../.. + zip -r Termix-Linux-Portable.zip release/linux-unpacked/* - name: Upload Linux Portable Artifact uses: actions/upload-artifact@v4 with: name: Termix-Linux-Portable - path: release/Termix-Linux-Portable.zip - retention-days: 30 + path: Termix-Linux-Portable.zip + retention-days: 3