diff options
| author | 2026-01-16 14:55:17 +0800 | |
|---|---|---|
| committer | 2026-01-16 14:55:17 +0800 | |
| commit | c3a0bef0767aec88fdd619199bed4bad6b57057c (patch) | |
| tree | 141e9c8c2ce5fd32cc00eea0f315b99010999702 | |
| parent | 4d6ed7b93ed57a2f397e4f8060b2b183b7c86774 (diff) | |
| download | DropOut-c3a0bef0767aec88fdd619199bed4bad6b57057c.tar.gz DropOut-c3a0bef0767aec88fdd619199bed4bad6b57057c.zip | |
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.
| -rw-r--r-- | .github/workflows/test.yml | 58 |
1 files 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 |