From 328244bbdbef6f6390d6969d48fed373b2b0056a Mon Sep 17 00:00:00 2001 From: MengNianxiaoyao <2589141604@qq.com> Date: Fri, 22 Dec 2023 11:57:35 +0800 Subject: [PATCH] feat: create ci build for action --- .github/workflows/ci.yml | 52 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..3e2748d3 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,52 @@ +name: Build + +on: + workflow_dispatch: + push: + branches: + # The branch where the project source code resides + # 项目源代码所在的分支 + - main + +jobs: + build: + runs-on: ${{ matrix.os }} + + strategy: + matrix: + node-version: [18.x] + os: [ubuntu-latest] + + steps: + - uses: actions/checkout@v3 + + - name: Install pnpm + uses: pnpm/action-setup@v2 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node-version }} + registry-url: https://registry.npmjs.org/ + cache: pnpm + + - name: Install Dependencies + run: pnpm i + + - name: Build + run: pnpm build + + - name: Build Extension + run: pnpm pack:crx && pnpm pack:zip + + - name: Upload Zip + uses: actions/upload-artifact@v3 + with: + name: BewlyBewly zip + path: extension.zip + + - name: Upload Crx + uses: actions/upload-artifact@v3 + with: + name: BewlyBewly Crx + path: extension.crx