diff --git a/.github/workflows/test-build.yml b/.github/workflows/test-build.yml new file mode 100644 index 0000000..1ac0844 --- /dev/null +++ b/.github/workflows/test-build.yml @@ -0,0 +1,77 @@ +name: 'Build Tauri Artifacts' + +on: + workflow_dispatch: # Allows manual triggering + +jobs: + build-tauri: + permissions: + contents: write + runs-on: ubuntu-22.04 + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: lts/* + cache: 'npm' + + - name: Get version (for logging / artifact name) + id: get-version + run: | + VERSION=$(node -p "require('./package.json').version") + echo "version=$VERSION" >> $GITHUB_OUTPUT + echo "Package version: $VERSION" + + - name: Install Rust stable + uses: dtolnay/rust-toolchain@stable + with: + components: rustfmt, clippy + + - name: Rust cache + uses: swatinem/rust-cache@v2 + with: + workspaces: './src-tauri -> target' + + - name: Install system dependencies (Ubuntu 22.04) + run: | + sudo apt-get update + sudo apt-get install -y \ + libwebkit2gtk-4.1-dev \ + libjavascriptcoregtk-4.1-0 \ + libjavascriptcoregtk-4.1-dev \ + libappindicator3-dev \ + librsvg2-dev \ + patchelf \ + build-essential \ + curl \ + wget \ + file \ + libssl-dev \ + libgtk-3-dev + + - name: Install frontend dependencies + run: npm ci + + - name: Build Tauri app (no release) + uses: tauri-apps/tauri-action@v0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # optional but harmless + TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }} + TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }} + with: + projectPath: '.' + includeDebug: false + includeRelease: true + includeUpdaterJson: true + tauriScript: 'npm run tauri' + + - name: Upload Tauri bundles as artifact + uses: actions/upload-artifact@v4 + with: + name: tauri-bundles-${{ steps.get-version.outputs.version }} + path: | + src-tauri/target/release/bundle/**