From 54cdccfc543c4ffb08d14124fbd1bd3d1d73fde0 Mon Sep 17 00:00:00 2001 From: ROOMrepair Date: Fri, 10 Jan 2025 14:00:02 +0800 Subject: [PATCH] add build extension workflow Signed-off-by: ROOMrepair --- .github/workflows/build-extension.yml | 38 +++++++++++++++++++ .../extensions/karmada-dashboard/src/index.ts | 2 +- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/build-extension.yml diff --git a/.github/workflows/build-extension.yml b/.github/workflows/build-extension.yml new file mode 100644 index 00000000..d2e6df1c --- /dev/null +++ b/.github/workflows/build-extension.yml @@ -0,0 +1,38 @@ +name: build-extension + +on: + push: + branches: + - main + tags: + - '*' + +env: + EXT_NAME: karmada-dashboard + +jobs: + build-extension: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: 16 + + - name: Install Yarn + run: npm install -g yarn + + - name: Install Dependencies + run: cd modules/web && yarn install + + - name: Build Extension + run: cd modules/web && yarn build:ext $EXT_NAME + + - name: Upload Extension Build + uses: actions/upload-artifact@v4 + with: + name: extension + path: modules/web/extensions/karmada-dashboard/dist \ No newline at end of file diff --git a/modules/web/extensions/karmada-dashboard/src/index.ts b/modules/web/extensions/karmada-dashboard/src/index.ts index 807e23df..a7552812 100644 --- a/modules/web/extensions/karmada-dashboard/src/index.ts +++ b/modules/web/extensions/karmada-dashboard/src/index.ts @@ -3,7 +3,7 @@ import locales from './locales'; const menus = [ { - parent: 'topbar', + parent: 'global', name: 'karmada-dashboard', title: 'Karmada Dashboard', icon: 'cluster',