Skip to content

Commit

Permalink
Fix building error
Browse files Browse the repository at this point in the history
  • Loading branch information
lich0821 committed Jul 4, 2024
1 parent f82c586 commit 94e1fef
Showing 1 changed file with 11 additions and 31 deletions.
42 changes: 11 additions & 31 deletions .github/workflows/Build-WeChatFerry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,7 @@ name: Build-WeChatFerry
on:
push:
tags:
- '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

- "v[0-9]+.[0-9]+.[0-9]+"

jobs:
build:
Expand All @@ -28,12 +12,12 @@ jobs:
steps:
- name: 检出代码
uses: actions/checkout@v4
# - name: 设置默认值
# run: |
# echo "USE_CACHE=${{ github.event.inputs.use_cache || 'yes' }}" >> $GITHUB_ENV
# echo "BUILD_CONFIGS=${{ github.event.inputs.build_configurations || 'Release,Debug' }}" >> $GITHUB_ENV

- name: 设置默认值
run: |
echo "USE_CACHE=yes" >> $GITHUB_ENV
echo "BUILD_CONFIGS=Release,Debug" >> $GITHUB_ENV
- name: 获取版本号和微信版本号
run: |
$version = (Select-String -Path "WeChatFerry/spy/spy.rc" -Pattern 'VALUE "FileVersion", "(.*)"').Matches.Groups[1].Value.Trim()
Expand All @@ -47,18 +31,18 @@ jobs:
- name: 设置 Visual Studio 2019
uses: microsoft/setup-msbuild@v2
with:
vs-version: '16.0' # 16.x 对应 Visual Studio 2019
vs-version: "16.0" # 16.x 对应 Visual Studio 2019

- name: 设置 Python 3
uses: actions/setup-python@v5
with:
python-version: '3.9'
python-version: "3.9"

- name: 安装 Python 依赖项
run: |
python -m pip install --upgrade pip
pip install grpcio-tools==1.48.2
- name: 设置缓存
id: cache-dependencies
# if: github.event.inputs.use_cache == 'yes'
Expand All @@ -70,9 +54,7 @@ jobs:
restore-keys: |
${{ runner.os }}-dependencies-
- name: 安装 vcpkg 和依赖项
# if: steps.cache-dependencies.outputs.cache-hit != 'true' || github.event.inputs.use_cache == 'no'
run: |
cd C:/Tools
git clone https://github.com/microsoft/vcpkg
Expand All @@ -85,8 +67,6 @@ jobs:
.\vcpkg\vcpkg integrate install
echo "VCPKG_ROOT=C:/Tools/vcpkg" >> $GITHUB_ENV
- name: 解析并构建配置
run: |
# $configurations = "${{ github.event.inputs.build_configurations }}".Split(',')
Expand All @@ -109,7 +89,7 @@ jobs:
- name: 列出预发布文件
run: |
Get-ChildItem -Path "WeChatFerry/tmp" -Recurse
- name: 发布固件到 Github Releases
uses: ncipollo/release-action@main
with:
Expand Down

0 comments on commit 94e1fef

Please sign in to comment.