From 3e47e042a08dd879c4efff6f54ebb7f4a4b656e5 Mon Sep 17 00:00:00 2001 From: Changhua Date: Wed, 30 Apr 2025 10:46:54 +0800 Subject: [PATCH] chore(ci): fix build and release --- .github/workflows/build-ci.yml | 8 ++++++++ .github/workflows/release.yml | 22 +++++++--------------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build-ci.yml b/.github/workflows/build-ci.yml index ce0529d..3d09895 100644 --- a/.github/workflows/build-ci.yml +++ b/.github/workflows/build-ci.yml @@ -76,3 +76,11 @@ jobs: /verbosity:minimal } shell: pwsh + + - name: 上传 + uses: actions/upload-artifact@v4 + with: + name: wechatferry-binaries + path: | + WeChatFerry/WeChatFerry/Out/*.dll + WeChatFerry/WeChatFerry/Out/*.md diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d977cdb..30be5f6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,6 +22,12 @@ jobs: - name: 检出代码 uses: actions/checkout@v4 + - name: 下载编译产物 + uses: actions/download-artifact@v4 + with: + name: wechatferry-binaries + path: tmp + - name: 获取版本号和微信版本号 shell: pwsh run: | @@ -36,18 +42,8 @@ jobs: - name: 打包输出文件及下载 WeChat 安装包 shell: pwsh run: | - # 在根目录创建 tmp - New-Item -ItemType Directory -Force -Path tmp - - # Release 版的 spy.dll 和 sdk.dll - $rel = "WeChatFerry/WeChatFerry/x64/Release" - # Debug 版的 spy_debug.dll - $dbg = "WeChatFerry/WeChatFerry/x64/Debug" - # 项目根的 DISCLAIMER.md - $md = "WeChatFerry/WeChatFerry/DISCLAIMER.md" - Compress-Archive ` - -Path "$rel/spy.dll","$rel/sdk.dll","$dbg/spy_debug.dll",$md ` + -Path "tmp/*" ` -DestinationPath "tmp/v${{ env.version }}.zip" # 下载对应版本微信安装包 @@ -55,10 +51,6 @@ jobs: -Uri "https://github.com/tom-snow/wechat-windows-versions/releases/download/v${{ env.wechat_version }}/WeChatSetup-${{ env.wechat_version }}.exe" ` -OutFile "tmp/WeChatSetup-${{ env.wechat_version }}.exe" - - name: 列出待发布文件 - shell: pwsh - run: Get-ChildItem -Path tmp -Recurse - - name: 发布到 GitHub Releases uses: ncipollo/release-action@main with: