Feature log details #24
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | name: Build and Release Tauri App | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| build-tauri: | |
| permissions: | |
| contents: write | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - platform: 'macos-latest' # Mac Intel x86_64 | |
| target: 'x86_64-apple-darwin' | |
| args: '--target x86_64-apple-darwin' | |
| - platform: 'macos-14' # Mac ARM (M1/M2) | |
| target: 'aarch64-apple-darwin' | |
| args: '--target aarch64-apple-darwin' | |
| - platform: 'ubuntu-24.04' # Linux x86_64 | |
| target: 'x86_64-unknown-linux-gnu' | |
| args: '--target x86_64-unknown-linux-gnu' | |
| - platform: 'windows-latest' # Windows x86_64 | |
| target: 'x86_64-pc-windows-msvc' | |
| args: '' | |
| runs-on: ${{ matrix.platform }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Install system dependencies (Linux only) | |
| if: matrix.platform == 'ubuntu-24.04' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf | |
| - name: Install system dependencies (macOS only) | |
| if: startsWith(matrix.platform, 'macos') | |
| run: | | |
| brew install create-dmg | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: lts/* | |
| cache: 'npm' | |
| - name: Setup Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: ${{ matrix.target }} | |
| - name: Cache Rust dependencies | |
| uses: swatinem/rust-cache@v2 | |
| with: | |
| workspaces: './src-tauri -> target' | |
| - name: Install frontend dependencies | |
| run: npm ci | |
| - name: Verify dependencies installed | |
| run: | | |
| echo "Checking if @vitejs/plugin-react-swc is installed..." | |
| npm list @vitejs/plugin-react-swc || echo "Warning: @vitejs/plugin-react-swc not found in node_modules" | |
| - name: Build Tauri app | |
| uses: tauri-apps/tauri-action@v0 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| args: ${{ matrix.args }} | |
| - name: Upload build artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: artifacts-${{ matrix.target }} | |
| path: | | |
| src-tauri/target/${{ matrix.target }}/release/bundle/**/*.msi | |
| src-tauri/target/${{ matrix.target }}/release/bundle/**/*.dmg | |
| src-tauri/target/${{ matrix.target }}/release/bundle/**/*.deb | |
| src-tauri/target/${{ matrix.target }}/release/bundle/**/*.AppImage | |
| src-tauri/target/release/bundle/**/*.msi | |
| src-tauri/target/release/bundle/**/*.dmg | |
| src-tauri/target/release/bundle/**/*.deb | |
| src-tauri/target/release/bundle/**/*.AppImage | |
| if-no-files-found: error | |
| virustotal-scan: | |
| needs: build-tauri | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: ./artifacts | |
| - name: Flatten artifacts | |
| run: | | |
| find ./artifacts -name "*.dmg" -o -name "*.msi" -o -name "*.deb" -o -name "*.AppImage" | xargs -I {} mv {} ./ | |
| - name: VirusTotal Scan | |
| uses: crazy-max/ghaction-virustotal@v4 | |
| with: | |
| vt_api_key: ${{ secrets.VIRUSTOTAL_API_KEY }} | |
| files: | | |
| *.dmg | |
| *.msi | |
| *.deb | |
| *.AppImage | |
| release: | |
| needs: [build-tauri, virustotal-scan] | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: ./artifacts | |
| - name: Create Draft Release 0.1.1 | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| tag_name: 0.1.1 | |
| name: Release 0.1.1 | |
| body: | | |
| Automated release for Nginx WAF Desktop Client v0.1.0. | |
| ## Changes | |
| - Cross-platform builds for Linux x86_64, Windows x86_64, Mac Intel, Mac ARM. | |
| ## Downloads | |
| Download the installer files (.msi for Windows, .dmg for Mac, .deb/.AppImage for Linux) for your platform from the assets below. | |
| draft: true | |
| files: ./artifacts/**/* | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |