From bf96544a515f56eb86ad2ff594af979f2467aa3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=B2=81=E6=A0=91=E4=BA=BA?= Date: Fri, 9 May 2025 05:56:39 +0900 Subject: [PATCH] ci: add build pipeline --- .gitea/workflows/build.yml | 48 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .gitea/workflows/build.yml diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml new file mode 100644 index 0000000..01fb375 --- /dev/null +++ b/.gitea/workflows/build.yml @@ -0,0 +1,48 @@ +name: Build +on: + workflow_dispatch: + push: + paths: + - "src/**/*" + - "package.json" + - "package-lock.json" + pull_request: + branches: [ main ] + types: [ opened, synchronize, reopened ] + paths: + - "src/**/*" + - "package.json" + - "package-lock.json" + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout codebase + uses: actions/checkout@v4 + + - name: Set up node + uses: actions/setup-node@v4 + with: + node-version-file: .nvmrc + + - name: Install dependencies + run: npm ci + + - name: Test + run: npm test + + - name: Build legacy + run: ./scripts/build-and-package.sh legacy + + - name: Build extension + run: ./scripts/build-and-package.sh extension + + - name: Build modern + run: ./scripts/build-and-package.sh modern + + - name: Publish artifact + uses: christopherhx/gitea-upload-artifact@v4 + with: + name: um-web-all + path: *.zip