|
| 1 | +name: Build & Release |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + tags: |
| 6 | + - 'v*' |
| 7 | + workflow_dispatch: |
| 8 | + inputs: |
| 9 | + dry_run: |
| 10 | + description: 'Build only (skip release creation)' |
| 11 | + required: false |
| 12 | + default: 'false' |
| 13 | + |
| 14 | +permissions: |
| 15 | + contents: write |
| 16 | + |
| 17 | +jobs: |
| 18 | + build: |
| 19 | + name: Build (${{ matrix.os }}) |
| 20 | + runs-on: ${{ matrix.os }} |
| 21 | + strategy: |
| 22 | + fail-fast: false |
| 23 | + matrix: |
| 24 | + os: [ubuntu-latest, windows-latest, macos-latest] |
| 25 | + |
| 26 | + steps: |
| 27 | + - name: Checkout |
| 28 | + uses: actions/checkout@v4 |
| 29 | + |
| 30 | + - name: Setup Node.js |
| 31 | + uses: actions/setup-node@v4 |
| 32 | + with: |
| 33 | + node-version: '20' |
| 34 | + cache: 'npm' |
| 35 | + |
| 36 | + - name: Install dependencies |
| 37 | + run: npm ci |
| 38 | + |
| 39 | + # Linux: install LinuxBuild dependencies so electron-builder can produce .deb / .AppImage |
| 40 | + - name: Install Linux build dependencies |
| 41 | + if: matrix.os == 'ubuntu-latest' |
| 42 | + run: | |
| 43 | + sudo apt-get update |
| 44 | + sudo apt-get install -y --no-install-recommends \ |
| 45 | + fakeroot dpkg rpm \ |
| 46 | + libgtk-3-0 libnotify4 libnss3 libxss1 libxtst6 \ |
| 47 | + xauth xvfb libasound2t64 ffmpeg \ |
| 48 | + python3 python3-venv python3-pip |
| 49 | +
|
| 50 | + # Windows: enable long paths for electron-builder |
| 51 | + - name: Enable Windows long paths |
| 52 | + if: matrix.os == 'windows-latest' |
| 53 | + shell: pwsh |
| 54 | + run: git config --system core.longpaths true |
| 55 | + |
| 56 | + - name: Build |
| 57 | + env: |
| 58 | + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 59 | + # macOS code signing (optional) |
| 60 | + CSC_LINK: ${{ secrets.CSC_LINK }} |
| 61 | + CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }} |
| 62 | + # Windows code signing (optional) |
| 63 | + CSC_IDENTITY_AUTO_DISCOVERY: 'false' |
| 64 | + run: | |
| 65 | + if [ "$RUNNER_OS" == "Linux" ]; then |
| 66 | + npm run build:linux |
| 67 | + elif [ "$RUNNER_OS" == "Windows" ]; then |
| 68 | + npm run build:win |
| 69 | + elif [ "$RUNNER_OS" == "macOS" ]; then |
| 70 | + npm run build:mac |
| 71 | + fi |
| 72 | +
|
| 73 | + - name: List build output |
| 74 | + run: ls -la dist || true |
| 75 | + |
| 76 | + - name: Upload artifacts |
| 77 | + uses: actions/upload-artifact@v4 |
| 78 | + with: |
| 79 | + name: opencluely-${{ matrix.os }} |
| 80 | + path: | |
| 81 | + dist/*.dmg |
| 82 | + dist/*.zip |
| 83 | + dist/*.exe |
| 84 | + dist/*.AppImage |
| 85 | + dist/*.deb |
| 86 | + if-no-files-found: warn |
| 87 | + |
| 88 | + release: |
| 89 | + name: Create GitHub Release |
| 90 | + needs: build |
| 91 | + if: startsWith(github.ref, 'refs/tags/v') |
| 92 | + runs-on: ubuntu-latest |
| 93 | + steps: |
| 94 | + - name: Download all artifacts |
| 95 | + uses: actions/download-artifact@v4 |
| 96 | + with: |
| 97 | + path: artifacts |
| 98 | + |
| 99 | + - name: Flatten artifacts |
| 100 | + run: | |
| 101 | + mkdir -p release |
| 102 | + find artifacts -type f \( -name '*.dmg' -o -name '*.zip' -o -name '*.exe' -o -name '*.AppImage' -o -name '*.deb' \) -exec cp -v {} release/ \; |
| 103 | + ls -la release/ |
| 104 | +
|
| 105 | + - name: Generate SHA256 checksums |
| 106 | + working-directory: release |
| 107 | + run: | |
| 108 | + sha256sum * > SHA256SUMS.txt |
| 109 | + cat SHA256SUMS.txt |
| 110 | +
|
| 111 | + - name: Create GitHub Release |
| 112 | + uses: softprops/action-gh-release@v2 |
| 113 | + with: |
| 114 | + tag_name: ${{ github.ref_name }} |
| 115 | + name: OpenCluely ${{ github.ref_name }} |
| 116 | + draft: false |
| 117 | + prerelease: false |
| 118 | + generate_release_notes: true |
| 119 | + body: | |
| 120 | + ## Installation |
| 121 | +
|
| 122 | + Choose the artifact for your platform: |
| 123 | +
|
| 124 | + | Platform | File | Notes | |
| 125 | + |---|---|---| |
| 126 | + | **Windows** | `*.exe` | NSIS installer — installs app + adds to Start Menu | |
| 127 | + | **Windows** | `*-portable.exe` | Portable, no install required | |
| 128 | + | **macOS (Apple Silicon)** | `*-arm64.dmg` | M1/M2/M3 Macs | |
| 129 | + | **macOS (Intel)** | `*-x64.dmg` | Older Intel Macs | |
| 130 | + | **Linux** | `*.deb` | Debian/Ubuntu — auto-pulls system deps (Python, ffmpeg, GTK) | |
| 131 | + | **Linux** | `*.AppImage` | Universal — no install, just chmod +x and run | |
| 132 | +
|
| 133 | + ## First Run |
| 134 | +
|
| 135 | + On first launch, OpenCluely will create `.env` and open the **Settings** window for you to enter your **Google Gemini API key**. You can paste it in the Settings UI or edit `.env` directly. |
| 136 | +
|
| 137 | + ## Optional: Local Whisper |
| 138 | +
|
| 139 | + For offline speech recognition, install **Python 3.10+** and **ffmpeg** on your system, then run from the project folder: |
| 140 | +
|
| 141 | + ```bash |
| 142 | + ./setup.sh --skip-install-system-deps |
| 143 | + ``` |
| 144 | +
|
| 145 | + See [README.md](https://github.com/TechyCSR/OpenCluely) for full setup details. |
| 146 | +
|
| 147 | + ## Checksums |
| 148 | +
|
| 149 | + See `SHA256SUMS.txt` attached to this release. |
| 150 | + files: | |
| 151 | + release/* |
| 152 | + fail_on_unmatched_files: false |
0 commit comments