From 4d0f9230bbc595caef2d989e611275f3ad2c7ddd Mon Sep 17 00:00:00 2001 From: PleahMaCaka Date: Thu, 19 Oct 2023 14:41:33 +0900 Subject: [PATCH] ci: run build test in everytime :) --- .github/workflows/build.yml | 50 +++++++++++++++++++++++++++++++++++++ 1 file changed, 50 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..fb94cc5 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,50 @@ +name: "build" +on: + push: + branches: + - '*' + pull_request: + branches: + - '*' + workflow_dispatch: + +jobs: + build: + strategy: + matrix: + os: [ ubuntu-latest ] + runs-on: ${{ matrix.os }} + + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 1 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: '18.x' + registry-url: 'https://registry.npmjs.org' + + - name: Setup pnpm + uses: pnpm/action-setup@v2 + + - name: Get pnpm store + id: pnpm-cache + run: | + echo "::set-output name=pnpm_cache_dir::$(pnpm store path)" + + - name: Setup pnpm cache + uses: actions/cache@v3 + with: + path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- + + - name: Install dependencies + run: pnpm install + + - name: Build + run: pnpm build \ No newline at end of file