Release Pro Windows #23
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 Pro Windows | |
| on: | |
| workflow_dispatch: | |
| permissions: write-all | |
| env: | |
| CARGO_INCREMENTAL: 0 | |
| RUST_BACKTRACE: short | |
| jobs: | |
| build: | |
| if: contains('["xlc520"]', github.actor) | |
| permissions: | |
| contents: write | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ windows-latest ] | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v2 | |
| with: | |
| version: 9 | |
| # 安装 Rust | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| # 安装依赖 | |
| - name: Install dependencies | |
| run: pnpm i | |
| # 打包 | |
| - name: Build application | |
| env: | |
| NODE_OPTIONS: "--max-old-space-size=8192" | |
| run: pnpm tauri:build | |
| # 打包成zip文件 | |
| - name: Create zip package | |
| run: | | |
| mkdir release-package | |
| xcopy src-tauri\target\release\*.exe release-package\ /Y | |
| xcopy src-tauri\target\release\resource\* release-package\resource\ /E /I /Y | |
| powershell Compress-Archive -Path release-package\* -DestinationPath easytier-manager-pro.zip | |
| # 上传便携版zip包 | |
| - name: Upload ZIP artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: easytier-manager-pro-portable | |
| path: easytier-manager-pro.zip | |
| # 上传 NSIS 安装包 | |
| - name: Upload NSIS artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: easytier-manager-pro-setup | |
| path: src-tauri/target/release/bundle/nsis/*.exe | |
| # 上传 MSI 安装包 | |
| - name: Upload MSI artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: easytier-manager-pro-msi | |
| path: src-tauri/target/release/bundle/msi/*.msi | |
| # 发布到 GitHub Releases,包括zip包 | |
| - name: Publish Release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| draft: true # 创建草稿 | |
| files: | | |
| src-tauri/target/release/bundle/msi/*.msi | |
| src-tauri/target/release/bundle/nsis/*.exe | |
| easytier-manager-pro.zip |