diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml new file mode 100644 index 0000000..45082ba --- /dev/null +++ b/.github/workflows/linux.yml @@ -0,0 +1,61 @@ +on: + push + +jobs: + build-linux: + runs-on: ubuntu-24.04 + + steps: + - name: Checkout repo (with submodules) + uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Update apt repos & install build deps + run: | + sudo apt-get update + sudo apt-get install -y build-essential libfuse2 fonts-noto-color-emoji libdbus-1-dev + + - name: Build webbluetooth dependency + run: | + cd api/webbluetooth + npm i + npm run build:all + + - name: Run update script + run: ./update.mjs + + - name: Install electron dependencies + run: | + cd electron + npm install + + - name: Ensure Electron build output exists + run: | + cd electron + # Check if entry file exists + if [ ! -f "out/main/index.js" ]; then + echo "⚠️ Entry file missing. Running build..." + npm run build || npm run build:all || echo "No build script available, skipping..." + else + echo "✅ Build output detected. Skipping rebuild." + fi + + - name: Build Electron AppImage + run: | + cd electron + npx electron-builder --linux AppImage + + - name: Generate SHA‑256 checksum + run: | + cd electron/dist + sha256sum *.AppImage > sha256sum.txt + cat sha256sum.txt + + - name: Upload AppImage & checksum artifacts + uses: actions/upload-artifact@v4 + with: + name: meshsense-linux + path: | + electron/dist/*.AppImage + electron/dist/sha256sum.txt