fix:Optimize triggering workflow methods and default parameters
Avoid frequent triggering and add default values to the workflow
This commit is contained in:
parent
d598ab72aa
commit
0deeb4aaf7
15
.github/workflows/Build-WeChatFerry.yml
vendored
15
.github/workflows/Build-WeChatFerry.yml
vendored
@ -2,9 +2,15 @@ name: Build-WeChatFerry
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [master]
|
branches:
|
||||||
|
- master
|
||||||
|
paths:
|
||||||
|
- 'WeChatFerry/**' # 仅当这个目录中的文件有变化时触发
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [master]
|
branches:
|
||||||
|
- master
|
||||||
|
paths:
|
||||||
|
- 'WeChatFerry/**'
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
use_cache:
|
use_cache:
|
||||||
@ -30,6 +36,11 @@ jobs:
|
|||||||
- name: 检出代码
|
- name: 检出代码
|
||||||
uses: actions/checkout@v4
|
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: 获取版本号和微信版本号
|
- 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()
|
||||||
|
Loading…
Reference in New Issue
Block a user