chore(ci): fix path
This commit is contained in:
parent
113bd15074
commit
40c5901fd7
23
.github/workflows/release.yml
vendored
23
.github/workflows/release.yml
vendored
@ -17,13 +17,13 @@ jobs:
|
||||
name: 打包 & 发布
|
||||
needs: build
|
||||
runs-on: windows-latest
|
||||
# 仅当触发源是 push 且是 Tag 时才执行
|
||||
if: ${{ github.event_name == 'push' }}
|
||||
steps:
|
||||
- name: 检出代码
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: 获取版本号和微信版本号
|
||||
shell: pwsh
|
||||
run: |
|
||||
$version_full = (Select-String -Path "WeChatFerry/spy/spy.rc" -Pattern 'VALUE "FileVersion", "(.*)"').Matches.Groups[1].Value.Trim()
|
||||
$wechat_version = (Select-String -Path "WeChatFerry/spy/spy.rc" -Pattern 'VALUE "ProductVersion", "(.*)"').Matches.Groups[1].Value.Trim()
|
||||
@ -32,19 +32,26 @@ jobs:
|
||||
echo "wechat_version=$wechat_version" >> $env:GITHUB_ENV
|
||||
echo "Program Version: $version"
|
||||
echo "WeChat Version: $wechat_version"
|
||||
shell: pwsh
|
||||
|
||||
- name: 打包输出文件及下载 WeChat 安装包
|
||||
run: |
|
||||
New-Item -ItemType Directory -Force -Path "tmp"
|
||||
Compress-Archive -Path "Out/sdk.dll", "Out/spy.dll", "Out/spy_debug.dll", "Out/DISCLAIMER.md" -DestinationPath "tmp/v${{ env.version }}.zip"
|
||||
Invoke-WebRequest -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"
|
||||
shell: pwsh
|
||||
run: |
|
||||
# 在根目录创建 tmp
|
||||
New-Item -ItemType Directory -Force -Path tmp
|
||||
|
||||
# 压缩根目录下 Out 中的产物
|
||||
Compress-Archive `
|
||||
-Path "WeChatFerry/Out/sdk.dll","WeChatFerry/Out/spy.dll","WeChatFerry/Out/spy_debug.dll","WeChatFerry/Out/DISCLAIMER.md" `
|
||||
-DestinationPath "tmp/v${{ env.version }}.zip"
|
||||
|
||||
# 下载对应 WeChat 安装包
|
||||
Invoke-WebRequest `
|
||||
-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: 列出待发布文件
|
||||
run: |
|
||||
Get-ChildItem -Path "tmp" -Recurse
|
||||
shell: pwsh
|
||||
run: Get-ChildItem -Path tmp -Recurse
|
||||
|
||||
- name: 发布到 GitHub Releases
|
||||
uses: ncipollo/release-action@main
|
||||
|
Loading…
Reference in New Issue
Block a user