fix: adjust indentation for linker setup step in build workflow #7
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: 'ubuntu-24.04' # Linux ARM | |
| target: 'aarch64-unknown-linux-gnu' | |
| args: '--target aarch64-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 | |
| # For ARM cross-compilation | |
| if [ "${{ matrix.target }}" = "aarch64-unknown-linux-gnu" ]; then | |
| sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu | |
| fi | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: lts/* | |
| - 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: Set linker for Linux ARM (aarch64) | |
| if: matrix.target == 'aarch64-unknown-linux-gnu' | |
| run: | | |
| mkdir -p ~/.cargo | |
| echo "[target.aarch64-unknown-linux-gnu]\nlinker = 'aarch64-linux-gnu-gcc'" > ~/.cargo/config.toml | |
| - name: Install frontend dependencies | |
| run: npm ci | |
| - name: Build Tauri app | |
| uses: tauri-apps/tauri-action@v0 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| PKG_CONFIG_ALLOW_CROSS: ${{ matrix.target == 'aarch64-unknown-linux-gnu' && '1' || '' }} | |
| 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/**/* | |
| src-tauri/target/release/bundle/**/* | |
| if-no-files-found: error | |
| release: | |
| needs: build-tauri | |
| 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 | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| tag_name: v0.1.0 | |
| name: Release v0.1.0 | |
| body: | | |
| Automated release for Nginx WAF Desktop Client v0.1.0. | |
| ## Changes | |
| - Cross-platform builds for Linux x86_64, Linux ARM, Windows x86_64, Mac Intel, Mac ARM. | |
| ## Downloads | |
| Download the appropriate installer for your platform from the assets below. | |
| draft: true | |
| files: ./artifacts/**/* | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |