From bf2fb4b161088ab948cc58dcdf5b4cdc2e388fbc Mon Sep 17 00:00:00 2001 From: Giang Minh Date: Tue, 29 Oct 2024 00:48:53 +0700 Subject: [PATCH 1/2] ci: added github action for checking build --- .github/workflows/check-build-ci.yml | 40 ++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/check-build-ci.yml diff --git a/.github/workflows/check-build-ci.yml b/.github/workflows/check-build-ci.yml new file mode 100644 index 0000000..8032975 --- /dev/null +++ b/.github/workflows/check-build-ci.yml @@ -0,0 +1,40 @@ +name: Check and Build + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: '18' + # Remove npm cache configuration + + - name: Install pnpm + uses: pnpm/action-setup@v2 + with: + version: 8 + + - name: Install dependencies + run: pnpm install + + - name: Build core + run: pnpm run build + working-directory: ./packages/core + + - name: Build hooks + run: pnpm run build + working-directory: ./packages/hooks + + - name: Build ui + run: pnpm run build + working-directory: ./packages/ui From 58f5d038fef3d80425ab60639e1c4fb08d4bf621 Mon Sep 17 00:00:00 2001 From: Giang Minh Date: Tue, 29 Oct 2024 00:50:05 +0700 Subject: [PATCH 2/2] fix wrong folder name --- .github/workflows/check-build-ci.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/check-build-ci.yml b/.github/workflows/check-build-ci.yml index 8032975..ed1d95e 100644 --- a/.github/workflows/check-build-ci.yml +++ b/.github/workflows/check-build-ci.yml @@ -27,14 +27,14 @@ jobs: - name: Install dependencies run: pnpm install - - name: Build core + - name: Build sdk-core run: pnpm run build - working-directory: ./packages/core + working-directory: ./packages/sdk-core - - name: Build hooks + - name: Build sdk-react-hooks run: pnpm run build - working-directory: ./packages/hooks + working-directory: ./packages/sdk-react-hooks - - name: Build ui + - name: Build sdk-react-ui run: pnpm run build - working-directory: ./packages/ui + working-directory: ./packages/sdk-react-ui