From 5049270ef20066da6844a0434ee831fa565760e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BE=9C=E8=8B=8F=E5=8D=9C=2E?= <yyaiwy666@163.com> Date: Sun, 21 Jul 2024 22:33:55 +0800 Subject: [PATCH] =?UTF-8?q?[=E2=9C=A8]=20GitHub=20actions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..11a6dc0 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,33 @@ +name: Build and Package + +on: + push: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Install Node.js + uses: actions/setup-node@v2 + + - name: Install dependencies + run: | + npm install -g yarn + yarn install + + - name: Build projext + run: yarn build + + - name: Package dist folder + run: zip -r dist.zip dist + + - name: Upload artifact + uses: actions/upload-artifact@v2 + with: + name: dist.zip + path: dist.zip