ci: 精简 GitHub Actions 为 release + pr_check 两个 workflow - #117
Merged
Conversation
Optimize GitHub Actions to only two workflows:
- release.yml: build & release ohos hap. Uses dart .vscode/build_env.dart
to generate .vscode/env.json only (drops pili_release.json and ps1
scripts). All other actions deleted.
- pr_check.yml: runs `dart analyze --no-fatal-warnings` on PRs so the
check fails only on actual errors, not on info/warning lints in
vendored Flutter widgets under lib/common/widgets/flutter/.
Removed:
.github/workflows/{build,ios,linux_x64,mac,test,win_x64}.yml
.github/workflows/release.yaml
lib/scripts/{build,patch}.ps1
Verification: both workflows have been manually triggered and passed
on the feat/ci branch. Run history available at:
https://github.com/qinshah/PiliPlus/actions
- release: https://github.com/qinshah/PiliPlus/actions/runs/29766727213
- pr_check: https://github.com/qinshah/PiliPlus/actions/runs/29768632667
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
优化 GitHub Actions:只保留 release 和 pr_check 两个 workflow
变更内容
将原本的多个 workflow 精简/合并为两个:
1.
release.yml(发布用)git describe,并清理路径中的/)→ 安装 ohos sdk / jdk17 / flutter-ohos →dart .vscode/build_env.dart生成.vscode/env.json→ flutter pub get → 重命名包为piliplus→ 构建 ohos hap → 上传草稿 releasepili_release.json,不再依赖 ps1 脚本2.
pr_check.yml(PR 检查用)flutter pub get+dart analyze --no-fatal-warnings删除的内容
build.yml、ios.yml、linux_x64.yml、mac.yml、test.yml、win_x64.yml、release.yamllib/scripts/build.ps1、lib/scripts/patch.ps1验证结果
两个 workflow 已在
qinshah/PiliPlus的feat/ci分支上手动触发并全部通过:完整的 Actions 运行历史可以到 https://github.com/qinshah/PiliPlus/actions 查看。
调整过程中遇到的问题及修复
easimon/maximize-build-space占满根分区导致 runner 日志写不下去 → 已移除flutter-version-file: pubspec.yaml无法解析>=3.41.9约束 → 改用flutter-version: "3.41.9"flutter pub get在 LFS 缺失对象时报错 → 加上GIT_LFS_SKIP_SMUDGE: 1${{ env.tag }}含/导致 cp 路径非法 → 改用git describe回退并清理/dart analyze默认把 info/warning 算作 fatal → 用--no-fatal-warnings只对 error 失败