From eb440220580b1c02e746826d780f6092c9f397ae Mon Sep 17 00:00:00 2001 From: coso Date: Sun, 14 Dec 2025 02:54:13 +0800 Subject: [PATCH] ci: add GitHub Actions release workflow for Windows and macOS --- .github/workflows/release.yml | 91 +++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 000000000..fa9690098 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,91 @@ +name: Release + +on: + push: + tags: + - 'v*' + workflow_dispatch: + inputs: + version: + description: 'Version to release (e.g., v0.1.0)' + required: true + default: 'v0.1.0' + +permissions: + contents: write + +jobs: + build: + strategy: + fail-fast: false + matrix: + include: + - platform: macos-latest + target: aarch64-apple-darwin + name: macOS-arm64 + - platform: windows-latest + target: x86_64-pc-windows-msvc + name: Windows-x64 + + runs-on: ${{ matrix.platform }} + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + cache: 'npm' + + - name: Setup Rust + uses: dtolnay/rust-toolchain@stable + with: + targets: ${{ matrix.target }} + + - name: Setup Rust cache + uses: Swatinem/rust-cache@v2 + with: + workspaces: src-tauri + shared-key: "rust-cache-${{ matrix.target }}" + cache-on-failure: true + + - name: Install frontend dependencies + run: npm ci + + - name: Build Tauri app + uses: tauri-apps/tauri-action@v0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tagName: ${{ github.event.inputs.version || github.ref_name }} + releaseName: 'ProxyCast ${{ github.event.inputs.version || github.ref_name }}' + releaseBody: | + ## ProxyCast Release + + ### Features + - AI API 代理服务 + - Kiro OAuth 凭证管理 + - OpenAI/Anthropic 兼容 API + - 自动检测凭证文件变化 + - 多 Provider 支持 + + ### Downloads + - **macOS (Apple Silicon)**: `proxycast_*_aarch64.dmg` + - **Windows (64-bit)**: `proxycast_*_x64-setup.exe` + + ### macOS 首次安装 + + 由于应用未经 Apple 签名,首次打开可能提示「应用已损坏」,请运行: + ```bash + xattr -cr /Applications/proxycast.app + ``` + + ### 默认配置 + - **端口**: 3001 + - **API Key**: proxycast-key + releaseDraft: false + prerelease: false + bundles: "dmg,nsis" + args: --target ${{ matrix.target }}