diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..8bec9b62 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,40 @@ +name: Build Project + +on: + push: + branches: + - master + pull_request: + +jobs: + build: + runs-on: ubuntu-latest + timeout-minutes: 10 + + steps: + - uses: actions/checkout@v3 + + - name: Setup Node and Corepack + uses: actions/setup-node@v3.6.0 + with: + node-version: 20.x + + - name: Enable Corepack and Set Yarn Version + run: | + corepack enable + corepack prepare yarn@4.x --activate + + - name: Restore Yarn Cache + uses: actions/cache@v3 + id: yarn-cache + with: + path: .yarn/cache + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- + + - name: Install dependencies + run: yarn install --immutable + + - name: Build project + run: yarn build