Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update workflows config #36

Merged
merged 1 commit into from
Jul 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/workflows/cd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: CD

on:
release:
types:
- published

jobs:
cd:
uses: halo-sigs/reusable-workflows/.github/workflows/plugin-cd.yaml@v1
secrets:
halo-username: ${{ secrets.HALO_USERNAME }}
halo-password: ${{ secrets.HALO_PASSWORD }}
permissions:
contents: write
with:
app-id: app-DlacW
ui-path: "."
15 changes: 15 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: CI

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
ci:
uses: halo-sigs/reusable-workflows/.github/workflows/plugin-ci.yaml@v1
with:
ui-path: "."
128 changes: 0 additions & 128 deletions .github/workflows/workflow.yaml

This file was deleted.

12 changes: 8 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,17 @@ node {
nodeProjectDir = file("${project.projectDir}")
}

task buildFrontend(type: PnpmTask) {
tasks.register('installDepsForUI', PnpmTask) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里可以直接用 pnpmInstall 替代。顺便,可以考虑升级一下 node gradle 插件。

args = ['install']
}

tasks.register('buildFrontend', PnpmTask) {
args = ['build:packages']
dependsOn('installDepsForUI')
}

build {
// build frontend before build
tasks.getByName('compileJava').dependsOn('buildFrontend')
tasks.named('build').configure {
dependsOn('buildFrontend')
}

halo {
Expand Down