Skip to content

Commit 578d1ca

Browse files
committed
feat(ci): 添加 Windows 可移植包的打包和上传步骤
1 parent 3483d0f commit 578d1ca

2 files changed

Lines changed: 33 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,24 @@ jobs:
157157
args: --target ${{ matrix.target }}
158158
includeUpdaterJson: true
159159

160+
- name: Package Windows portable (zip)
161+
if: contains(matrix.target, 'windows')
162+
shell: pwsh
163+
run: |
164+
$exe = "src-tauri/target/${{ matrix.target }}/release/AQBot.exe"
165+
$arch = if ("${{ matrix.target }}" -match "aarch64") { "arm64" } else { "x64" }
166+
$zipName = "AQBot_${{ github.ref_name }}_windows-${arch}-portable.zip"
167+
Compress-Archive -Path $exe -DestinationPath $zipName
168+
169+
- name: Upload Windows portable to release
170+
if: contains(matrix.target, 'windows')
171+
uses: softprops/action-gh-release@v2
172+
with:
173+
tag_name: ${{ github.ref_name }}
174+
draft: true
175+
token: ${{ secrets.GITHUB_TOKEN }}
176+
files: AQBot_${{ github.ref_name }}_windows-*-portable.zip
177+
160178
# ── Build for Linux ARM64 (cross-compile) ──────────────
161179
release-linux-arm:
162180
name: Build (aarch64-unknown-linux-gnu)

.github/workflows/test-windows-build.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,3 +65,18 @@ jobs:
6565
prerelease: true
6666
tauriScript: pnpm tauri
6767
args: --target x86_64-pc-windows-msvc
68+
69+
- name: Package Windows portable (zip)
70+
shell: pwsh
71+
run: |
72+
$exe = "src-tauri/target/x86_64-pc-windows-msvc/release/AQBot.exe"
73+
$zipName = "AQBot_${{ github.ref_name }}_windows-x64-portable.zip"
74+
Compress-Archive -Path $exe -DestinationPath $zipName
75+
76+
- name: Upload Windows portable to release
77+
uses: softprops/action-gh-release@v2
78+
with:
79+
tag_name: ${{ github.ref_name }}
80+
draft: true
81+
token: ${{ secrets.GITHUB_TOKEN }}
82+
files: AQBot_${{ github.ref_name }}_windows-x64-portable.zip

0 commit comments

Comments
 (0)