Merge pull request #996 from web3dev1337/feature/mobile-worktree-side… #101
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: linux | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| profile: | |
| description: 'Build profile (release or fast)' | |
| required: false | |
| default: 'fast' | |
| type: choice | |
| options: | |
| - fast | |
| - release | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - "v*" | |
| pull_request: | |
| permissions: | |
| contents: write | |
| jobs: | |
| tauri_linux: | |
| name: tauri build (linux) | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 60 | |
| env: | |
| LINUX_BUNDLES: deb,pacman | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| cache: "npm" | |
| - name: Resolve bundled Node version | |
| id: bundled_node_version | |
| run: | | |
| echo "value=$(node -p 'process.version')" >> "$GITHUB_OUTPUT" | |
| - name: Setup Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Rust cache | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| workspaces: "src-tauri -> target" | |
| - name: Cache packaged backend production deps | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| src-tauri/resources/backend/node_modules | |
| src-tauri/resources/backend/.prod-install-stamp.json | |
| key: ${{ runner.os }}-tauri-backend-prod-${{ steps.bundled_node_version.outputs.value }}-${{ hashFiles('.nvmrc', 'package.json', 'package-lock.json', 'scripts/tauri/prepare-backend-resources.js') }} | |
| - name: Install Linux build dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| build-essential \ | |
| libarchive-tools \ | |
| libayatana-appindicator3-dev \ | |
| libgtk-3-dev \ | |
| librsvg2-dev \ | |
| libssl-dev \ | |
| libwebkit2gtk-4.1-dev \ | |
| libxdo-dev \ | |
| patchelf \ | |
| zstd | |
| - name: Install | |
| run: npm ci | |
| - name: Sync release versions | |
| run: npm run release:sync-version | |
| - name: Release version consistency | |
| run: npm run release:check-version | |
| - name: Determine build profile | |
| id: build_profile | |
| run: | | |
| PROFILE="${{ github.event.inputs.profile }}" | |
| if [ -z "$PROFILE" ]; then | |
| if [[ "$GITHUB_REF" == refs/tags/* ]]; then | |
| PROFILE="release" | |
| else | |
| PROFILE="fast" | |
| fi | |
| fi | |
| echo "value=$PROFILE" >> "$GITHUB_OUTPUT" | |
| if [ "$PROFILE" = "fast" ]; then | |
| echo "target_dir=fast" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "target_dir=release" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: Build Linux bundles (Tauri) | |
| run: | | |
| node scripts/tauri/run-tauri-build.js --profile ${{ steps.build_profile.outputs.value }} --bundles $LINUX_BUNDLES | |
| - name: Upload build artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: tauri-linux-bundle | |
| if-no-files-found: error | |
| path: | | |
| src-tauri/target/${{ steps.build_profile.outputs.target_dir }}/bundle/deb/*.deb | |
| src-tauri/target/${{ steps.build_profile.outputs.target_dir }}/bundle/pacman/*.pkg.tar.zst | |
| - name: Upload Linux assets to GitHub Release (tags only) | |
| if: startsWith(github.ref, 'refs/tags/') | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ github.ref_name }} | |
| # Upload only; the Windows workflow owns generated release notes. | |
| files: | | |
| src-tauri/target/${{ steps.build_profile.outputs.target_dir }}/bundle/deb/*.deb | |
| src-tauri/target/${{ steps.build_profile.outputs.target_dir }}/bundle/pacman/*.pkg.tar.zst |