Fix building error
This commit is contained in:
parent
f82c5869c0
commit
94e1fef820
42
.github/workflows/Build-WeChatFerry.yml
vendored
42
.github/workflows/Build-WeChatFerry.yml
vendored
@ -3,23 +3,7 @@ name: Build-WeChatFerry
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- 'v[0-9]+.[0-9]+.[0-9]+'
|
- "v[0-9]+.[0-9]+.[0-9]+"
|
||||||
workflow_dispatch:
|
|
||||||
# inputs:
|
|
||||||
# use_cache:
|
|
||||||
# description: '是否使用缓存'
|
|
||||||
# required: true
|
|
||||||
# default: 'yes'
|
|
||||||
# type: choice
|
|
||||||
# options:
|
|
||||||
# - 'yes'
|
|
||||||
# - 'no'
|
|
||||||
# build_configurations:
|
|
||||||
# description: '编译配置(使用逗号分隔多个配置)'
|
|
||||||
# required: true
|
|
||||||
# default: 'Release,Debug'
|
|
||||||
# type: string
|
|
||||||
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@ -28,12 +12,12 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: 检出代码
|
- name: 检出代码
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
# - name: 设置默认值
|
- name: 设置默认值
|
||||||
# run: |
|
run: |
|
||||||
# echo "USE_CACHE=${{ github.event.inputs.use_cache || 'yes' }}" >> $GITHUB_ENV
|
echo "USE_CACHE=yes" >> $GITHUB_ENV
|
||||||
# echo "BUILD_CONFIGS=${{ github.event.inputs.build_configurations || 'Release,Debug' }}" >> $GITHUB_ENV
|
echo "BUILD_CONFIGS=Release,Debug" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: 获取版本号和微信版本号
|
- name: 获取版本号和微信版本号
|
||||||
run: |
|
run: |
|
||||||
$version = (Select-String -Path "WeChatFerry/spy/spy.rc" -Pattern 'VALUE "FileVersion", "(.*)"').Matches.Groups[1].Value.Trim()
|
$version = (Select-String -Path "WeChatFerry/spy/spy.rc" -Pattern 'VALUE "FileVersion", "(.*)"').Matches.Groups[1].Value.Trim()
|
||||||
@ -47,18 +31,18 @@ jobs:
|
|||||||
- name: 设置 Visual Studio 2019
|
- name: 设置 Visual Studio 2019
|
||||||
uses: microsoft/setup-msbuild@v2
|
uses: microsoft/setup-msbuild@v2
|
||||||
with:
|
with:
|
||||||
vs-version: '16.0' # 16.x 对应 Visual Studio 2019
|
vs-version: "16.0" # 16.x 对应 Visual Studio 2019
|
||||||
|
|
||||||
- name: 设置 Python 3
|
- name: 设置 Python 3
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: '3.9'
|
python-version: "3.9"
|
||||||
|
|
||||||
- name: 安装 Python 依赖项
|
- name: 安装 Python 依赖项
|
||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
pip install grpcio-tools==1.48.2
|
pip install grpcio-tools==1.48.2
|
||||||
|
|
||||||
- name: 设置缓存
|
- name: 设置缓存
|
||||||
id: cache-dependencies
|
id: cache-dependencies
|
||||||
# if: github.event.inputs.use_cache == 'yes'
|
# if: github.event.inputs.use_cache == 'yes'
|
||||||
@ -70,9 +54,7 @@ jobs:
|
|||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-dependencies-
|
${{ runner.os }}-dependencies-
|
||||||
|
|
||||||
|
|
||||||
- name: 安装 vcpkg 和依赖项
|
- name: 安装 vcpkg 和依赖项
|
||||||
# if: steps.cache-dependencies.outputs.cache-hit != 'true' || github.event.inputs.use_cache == 'no'
|
|
||||||
run: |
|
run: |
|
||||||
cd C:/Tools
|
cd C:/Tools
|
||||||
git clone https://github.com/microsoft/vcpkg
|
git clone https://github.com/microsoft/vcpkg
|
||||||
@ -85,8 +67,6 @@ jobs:
|
|||||||
.\vcpkg\vcpkg integrate install
|
.\vcpkg\vcpkg integrate install
|
||||||
echo "VCPKG_ROOT=C:/Tools/vcpkg" >> $GITHUB_ENV
|
echo "VCPKG_ROOT=C:/Tools/vcpkg" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
- name: 解析并构建配置
|
- name: 解析并构建配置
|
||||||
run: |
|
run: |
|
||||||
# $configurations = "${{ github.event.inputs.build_configurations }}".Split(',')
|
# $configurations = "${{ github.event.inputs.build_configurations }}".Split(',')
|
||||||
@ -109,7 +89,7 @@ jobs:
|
|||||||
- name: 列出预发布文件
|
- name: 列出预发布文件
|
||||||
run: |
|
run: |
|
||||||
Get-ChildItem -Path "WeChatFerry/tmp" -Recurse
|
Get-ChildItem -Path "WeChatFerry/tmp" -Recurse
|
||||||
|
|
||||||
- name: 发布固件到 Github Releases
|
- name: 发布固件到 Github Releases
|
||||||
uses: ncipollo/release-action@main
|
uses: ncipollo/release-action@main
|
||||||
with:
|
with:
|
||||||
|
Loading…
Reference in New Issue
Block a user