chore: 更新 Cargo.lock 版本至 0.1.2 #4
Workflow file for this run
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: release | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| permissions: | |
| contents: write | |
| jobs: | |
| publish-tauri: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - platform: ubuntu-22.04 | |
| args: "" | |
| flavor: "lite" # 恩兔的轻便装(不含第三方工具) | |
| - platform: windows-latest | |
| args: "" | |
| flavor: "lite" # 恩兔的轻便装(不含第三方工具) | |
| runs-on: ${{ matrix.platform }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: lts/* | |
| cache: npm | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Rust cache | |
| uses: swatinem/rust-cache@v2 | |
| with: | |
| workspaces: "./src-tauri -> target" | |
| - name: Install Linux dependencies | |
| if: matrix.platform == 'ubuntu-22.04' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf | |
| - name: Install frontend dependencies | |
| run: npm ci | |
| - name: Verify no bundled edge (linux) | |
| if: matrix.platform == 'ubuntu-22.04' | |
| run: | | |
| if ls src-tauri/bin/edge* 1> /dev/null 2>&1; then | |
| echo "Found src-tauri/bin/edge*. Release must not bundle edge." >&2 | |
| exit 1 | |
| fi | |
| - name: Verify no bundled edge (windows) | |
| if: matrix.platform == 'windows-latest' | |
| shell: pwsh | |
| run: | | |
| $edges = Get-ChildItem -Path "src-tauri\\bin" -Filter "edge*" -ErrorAction SilentlyContinue | |
| if ($edges) { | |
| Write-Error "Found src-tauri\\bin\\edge*. Release must not bundle edge." | |
| exit 1 | |
| } | |
| - name: Build and release | |
| uses: tauri-apps/tauri-action@v0 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| tagName: ${{ github.ref_name }} | |
| releaseName: "N2N Maid ${{ github.ref_name }}" | |
| releaseBody: | | |
| ## 下载说明 | |
| 命名规则:`[name]_[version]_[platform]_[arch]_[bundle]_lite[ext]` | |
| - Windows:优先下载 `*_nsis_lite.exe`(安装包),也可用 `*_msi_lite.msi` | |
| - Linux:推荐 `*_appimage_lite.AppImage`;Debian/Ubuntu 可用 `*_deb_lite.deb`;RPM 系发行版用 `*_rpm_lite.rpm` | |
| 备注:lite 版本不包含 `bin/edge`,请在设置中填写 `edge_path` 或将 `edge` 放入 PATH。 | |
| releaseDraft: false | |
| prerelease: false | |
| includeUpdaterJson: false | |
| assetNamePattern: "[name]_[version]_[platform]_[arch]_[bundle]_${{ matrix.flavor }}[ext]" | |
| args: ${{ matrix.args }} |