From 18b79d3693bd0f1102fd52e362308b396d124306 Mon Sep 17 00:00:00 2001 From: oomeow Date: Thu, 2 Oct 2025 12:32:12 +0800 Subject: [PATCH] ci: add linux dev bundle --- .github/workflows/dev.yml | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index 89a55a30..bda3e71a 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -18,6 +18,11 @@ on: required: false type: boolean default: true + run_linux_amd64: + description: "运行 Linux amd64" + required: false + type: boolean + default: true permissions: write-all env: @@ -50,6 +55,11 @@ jobs: bundle: nsis id: windows-arm64 input: run_windows_arm64 + - os: linux-latest + target: x86_64-unknown-linux-gnu + bundle: deb + id: linux-amd64 + input: run_linux_amd64 runs-on: ${{ matrix.os }} steps: @@ -78,6 +88,12 @@ jobs: cache-all-crates: true shared-key: autobuild-shared + - name: Install dependencies (ubuntu only) + if: matrix.os == 'linux-latest' && github.event.inputs[matrix.input] == 'true' + run: | + sudo apt-get update + sudo apt-get install -y libxslt1.1 libwebkit2gtk-4.1-dev libayatana-appindicator3-dev librsvg2-dev patchelf + - uses: pnpm/action-setup@v4 name: Install pnpm if: github.event.inputs[matrix.input] == 'true' @@ -119,7 +135,7 @@ jobs: tauriScript: pnpm args: --target ${{ matrix.target }} -b ${{ matrix.bundle }} - - name: Upload Artifacts + - name: Upload Artifacts (macOS) if: matrix.os == 'macos-latest' && github.event.inputs[matrix.input] == 'true' uses: actions/upload-artifact@v4 with: @@ -127,10 +143,18 @@ jobs: path: src-tauri/target/${{ matrix.target }}/release/bundle/dmg/*.dmg if-no-files-found: error - - name: Upload Artifacts + - name: Upload Artifacts (Windows) if: matrix.os == 'windows-latest' && github.event.inputs[matrix.input] == 'true' uses: actions/upload-artifact@v4 with: name: ${{ matrix.target }} path: src-tauri/target/${{ matrix.target }}/release/bundle/nsis/*.exe if-no-files-found: error + + - name: Upload Artifacts (Linux) + if: matrix.os == 'linux-latest' && github.event.inputs[matrix.input] == 'true' + uses: actions/upload-artifact@v4 + with: + name: ${{ matrix.target }} + path: src-tauri/target/${{ matrix.target }}/release/bundle/deb/*.deb + if-no-files-found: error