ci(build-bot): 支持 version= 参数指定版本;mac 大小写不敏感;加速 macOS 构建
1. @build-bot build mac version=1.1.3 可指定版本(缺省仍读 Directory.Build.props) - 评论里 version=x.y.z 优先,大小写不敏感 - mac / Mac / MAC 都能匹配(grep -oiE 已忽略大小写) - 版本透传给 build.sh / build.ps1,回帖与 Release notes 都显示版本 2. macOS 构建提速 - 缓存 NuGet 包(~/.nuget/packages)与 CocoaPods(Pods/ + Caches) - runner 固定 macos-14(原生 arm64,避开 Rosetta 模拟) - build-bot 与 build-release 两个工作流同步优化
This commit is contained in:
1 parent
40d9da1c3d
commit
8b4cabba28
2 files changed
+57
-11
No files matched your search
@@ -116,7 +116,7 @@ jobs:
|
||||
build-mac:
|
||||
needs: prepare
|
||||
if: needs.prepare.outputs.ok == 'true'
|
||||
runs-on: macos-latest
|
||||
runs-on: macos-14
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
@@ -126,12 +126,28 @@ jobs:
|
||||
with:
|
||||
dotnet-version: ${{ env.DOTNET_VERSION }}
|
||||
|
||||
# NuGet 包缓存:依赖没变时省去冷下载
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.nuget/packages
|
||||
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj', '**/*.props', '**/packages.lock.json') }}
|
||||
restore-keys: ${{ runner.os }}-nuget-
|
||||
|
||||
- uses: subosito/flutter-action@v2
|
||||
with:
|
||||
flutter-version: ${{ env.FLUTTER_VERSION }}
|
||||
channel: stable
|
||||
cache: true
|
||||
|
||||
# CocoaPods:Pods/ 被 gitignore,Podfile.lock 没变时复用,省掉 pod install
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
GC-UI/frontend/macos/Pods
|
||||
~/Library/Caches/CocoaPods
|
||||
key: ${{ runner.os }}-pods-${{ hashFiles('GC-UI/frontend/macos/Podfile.lock') }}
|
||||
restore-keys: ${{ runner.os }}-pods-
|
||||
|
||||
- name: 环境信息
|
||||
run: |
|
||||
sw_vers
|
||||
|
||||
Reference in new issue
Block a user