From c3a0bef0767aec88fdd619199bed4bad6b57057c Mon Sep 17 00:00:00 2001 From: HsiangNianian Date: Fri, 16 Jan 2026 14:55:17 +0800 Subject: feat: enhance CI workflow by adding Node.js, pnpm, and Tauri CLI installation Updated the GitHub Actions workflow to include steps for installing Node.js and pnpm, as well as the Tauri CLI. Added commands to install frontend dependencies and build the application for different operating systems, ensuring a more robust and comprehensive CI process. --- .github/workflows/test.yml | 58 +++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 55 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5440cd8..ebf0b91 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -65,6 +65,23 @@ jobs: - name: Install Rust uses: dtolnay/rust-toolchain@stable + - name: Install Node.js + uses: actions/setup-node@v4 + with: + node-version: 20 + + - name: Install pnpm + uses: pnpm/action-setup@v2 + with: + version: 8 + + - name: Install Frontend Dependencies + working-directory: ./ui + run: pnpm install + + - name: Install Tauri CLI + run: cargo install tauri-cli + - name: Rust Cache uses: swatinem/rust-cache@v2 with: @@ -74,6 +91,41 @@ jobs: working-directory: ./src-tauri run: cargo test --verbose - - name: Build (Dev) - working-directory: ./src-tauri - run: cargo build --verbose + - name: Build App (Debug) + run: cargo tauri build --debug + + - name: Get Short SHA + id: slug + run: echo "sha8=$(echo ${GITHUB_SHA} | cut -c1-8)" >> $GITHUB_OUTPUT + + - name: Upload Artifact (Linux) + if: runner.os == 'Linux' + uses: actions/upload-artifact@v4 + with: + name: dropout-linux-${{ matrix.wayland && 'arch' || 'ubuntu' }}-${{ steps.slug.outputs.sha8 }} + path: | + src-tauri/target/debug/bundle/appimage/*.AppImage + src-tauri/target/debug/bundle/deb/*.deb + src-tauri/target/debug/dropout + retention-days: 5 + + - name: Upload Artifact (Windows) + if: runner.os == 'Windows' + uses: actions/upload-artifact@v4 + with: + name: dropout-windows-${{ steps.slug.outputs.sha8 }} + path: | + src-tauri/target/debug/bundle/msi/*.msi + src-tauri/target/debug/bundle/nsis/*.exe + src-tauri/target/debug/dropout.exe + retention-days: 5 + + - name: Upload Artifact (macOS) + if: runner.os == 'macOS' + uses: actions/upload-artifact@v4 + with: + name: dropout-macos-${{ steps.slug.outputs.sha8 }} + path: | + src-tauri/target/debug/bundle/dmg/*.dmg + src-tauri/target/debug/bundle/macos/DropOut.app + retention-days: 5 -- cgit v1.2.3-70-g09d2