Skip to content

Commit 9f04f1b

Browse files
authored
chore: update workflows config (#28)
### What this PR does? 使用新的 https://github.com/halo-sigs/reusable-workflows 来作为项目 CI ,简化配置后方便插件开发者使用而不必过多修改 ```release-note None ```
1 parent b317992 commit 9f04f1b

File tree

3 files changed

+24
-108
lines changed

3 files changed

+24
-108
lines changed

.github/workflows/ci.yaml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
ci:
13+
uses: halo-sigs/reusable-workflows/.github/workflows/plugin-ci.yaml@v1
14+
with:
15+
ui-path: "ui"

.github/workflows/workflow.yaml

-106
This file was deleted.

build.gradle

+9-2
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,20 @@ node {
3535
nodeProjectDir = file("${project.projectDir}/ui")
3636
}
3737

38-
task buildFrontend(type: PnpmTask) {
38+
tasks.register('buildFrontend', PnpmTask) {
3939
args = ['build']
40+
dependsOn('installDepsForUI')
41+
}
42+
43+
tasks.register('installDepsForUI', PnpmTask) {
44+
args = ['install']
4045
}
4146

4247
build {
4348
// build frontend before build
44-
tasks.getByName('compileJava').dependsOn('buildFrontend')
49+
tasks.named('compileJava').configure {
50+
dependsOn('buildFrontend')
51+
}
4552
}
4653

4754
halo {

0 commit comments

Comments
 (0)