Merge pull request #173 from KenGrofork/patch-1

fix:Optimize triggering workflow methods and default parameters
This commit is contained in:
Changhua 2024-07-04 16:46:39 +08:00 committed by GitHub
commit 6ebdaf5f57
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2,9 +2,8 @@ name: Build-WeChatFerry
on: on:
push: push:
branches: [master] tags:
pull_request: - 'v[0-9]+.[0-9]+.[0-9]+'
branches: [master]
workflow_dispatch: workflow_dispatch:
inputs: inputs:
use_cache: use_cache:
@ -29,7 +28,12 @@ jobs:
steps: steps:
- 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()