ci: 发布验收 P0 项——补齐 CI/CD 工作流

- .github/workflows/ci.yml: push/PR 触发,复用 halo-sigs/reusable-workflows
  plugin-ci.yaml@v5 执行 ./gradlew clean build(全部测试+检查)
- .github/workflows/cd.yml: GitHub Release published 触发,复用 plugin-cd.yaml@v5,
  按发布 tag 去 v 前缀注入 -Pversion 构建(-x check,不替代发布前 CI),
  skip-appstore-release: true——首次上架审核前只上传 Release 资产,不自动同步应用市场
- 根目录 gradlew/gradlew.bat: 转发到 plugin-operation-audit/ 的 Gradle wrapper
  (官方可复用工作流从仓库根执行 ./gradlew,build-args 以 -p 指定子项目目录)
- artifacts-path 限定 plugin-operation-audit/build/libs(仅插件 JAR,不误传其他制品)
This commit is contained in:
2026-11-22 23:26:07 +08:00
parent 81693e4778
commit 44eca75e6e
4 changed files with 64 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
name: CD
# Halo 官方可复用插件 CD 工作流:基于 GitHub Release tag 注入版本号构建 JAR 并
# 上传到 Release 资产。可复用工作流内部执行:
# ./gradlew clean build -x check -Pversion=${tag 去 v 前缀} <build-args>
# 因此 Release tag(如 v0.1.0)自动保证 JAR 文件名 / plugin.yaml spec.version /
# Manifest Implementation-Version 三处一致。
# 注意:CD 构建带 -x check,不能替代发布前必须通过且不可跳过的 CI 与测试。
# 首次上架应用市场审核通过前,skip-appstore-release: true —— 只上传
# GitHub Release 资产,不自动同步应用市场;审核通过后按官方发布文档
# 配置 app-id 与最小权限的个人令牌(HALO_PAT)后再开启同步。
on:
release:
types:
- published
jobs:
cd:
uses: halo-sigs/reusable-workflows/.github/workflows/plugin-cd.yaml@v5
permissions:
contents: write
with:
ui-path: "plugin-operation-audit/ui"
artifacts-path: "plugin-operation-audit/build/libs"
build-args: "-p plugin-operation-audit"
skip-node-setup: true
skip-appstore-release: true