Skip to content

Commit 5b24556

Browse files
authored
chore: update workflows config (#96)
### What this PR does? 使用 [reusable workflows](https://github.com/halo-sigs/reusable-workflows) 替换原本的配置 ```release-note None ```
1 parent dfcca1b commit 5b24556

File tree

4 files changed

+42
-130
lines changed

4 files changed

+42
-130
lines changed

.github/workflows/build.yml

-127
This file was deleted.

.github/workflows/cd.yaml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: CD
2+
3+
on:
4+
release:
5+
types:
6+
- published
7+
8+
jobs:
9+
cd:
10+
uses: halo-sigs/reusable-workflows/.github/workflows/plugin-cd.yaml@v1
11+
secrets:
12+
halo-username: ${{ secrets.HALO_USERNAME }}
13+
halo-password: ${{ secrets.HALO_PASSWORD }}
14+
permissions:
15+
contents: write
16+
with:
17+
app-id: app-SnwWD
18+
ui-path: "console"

.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: "console"

build.gradle

+9-3
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,19 @@ node {
2929
nodeProjectDir = file("${project.projectDir}/console")
3030
}
3131

32-
task buildFrontend(type: PnpmTask) {
32+
tasks.register('installDepsForUI', PnpmTask) {
33+
args = ['install']
34+
}
35+
36+
tasks.register('buildFrontend', PnpmTask) {
3337
args = ['build']
38+
dependsOn('installDepsForUI')
3439
}
3540

3641
build {
37-
// build frontend before build
38-
tasks.getByName('compileJava').dependsOn('buildFrontend')
42+
tasks.named('compileJava').configure {
43+
dependsOn('buildFrontend')
44+
}
3945
}
4046

4147
halo {

0 commit comments

Comments
 (0)