diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml new file mode 100644 index 0000000..a6caf19 --- /dev/null +++ b/.github/workflows/dev.yml @@ -0,0 +1,17 @@ +name: Publish Package to npmjs + +on: + push: + branches: [dev] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + always-auth: true + node-version: 16 + cache: 'yarn' + - run: sh scripts/build.sh dev diff --git a/.github/workflows/pre.yml b/.github/workflows/pre.yml new file mode 100644 index 0000000..cdde0c9 --- /dev/null +++ b/.github/workflows/pre.yml @@ -0,0 +1,17 @@ +name: Publish Package to npmjs + +on: + push: + branches: [pre-develop] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + always-auth: true + node-version: 16 + cache: 'yarn' + - run: sh scripts/build.sh pre diff --git a/.github/workflows/prod.yml b/.github/workflows/prod.yml new file mode 100644 index 0000000..46dc234 --- /dev/null +++ b/.github/workflows/prod.yml @@ -0,0 +1,17 @@ +name: Publish Package to npmjs + +on: + push: + branches: [main, master, release, develop] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + always-auth: true + node-version: 16 + cache: 'yarn' + - run: sh scripts/build.sh diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..73f1883 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,17 @@ +name: Publish Package to npmjs + +on: + push: + branches: [test-develop] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + always-auth: true + node-version: 16 + cache: 'yarn' + - run: sh scripts/build.sh test diff --git a/package.json b/package.json index 4fc76fb..41b90a1 100644 --- a/package.json +++ b/package.json @@ -53,6 +53,7 @@ "echarts": "^5.4.3", "eslint-plugin-import": "^2.25.2", "path": "^0.12.7", + "postcss": "^8.0.0", "prettier": "^3.0.0", "sass": "^1.64.1", "smooth-scrollbar": "^8.8.4", diff --git a/scripts/build.sh b/scripts/build.sh new file mode 100644 index 0000000..a212c04 --- /dev/null +++ b/scripts/build.sh @@ -0,0 +1,17 @@ +#!/bin/sh +set -e +ENV=$1 + +__build() { + echo "安装依赖" + yarn + echo "开始打包" + yarn build:$ENV + echo "打包完成" +} + +__main() { +__build +} + +__main \ No newline at end of file diff --git a/src/components/layout/layout.vue b/src/components/layout/layout.vue index 1d73511..5f6be93 100644 --- a/src/components/layout/layout.vue +++ b/src/components/layout/layout.vue @@ -16,7 +16,12 @@ - +