From 65036cbfc0c2a936241ceea6e9cb3444580ebeb5 Mon Sep 17 00:00:00 2001 From: Sheik Althaf Date: Sat, 22 Jun 2024 10:51:56 +0530 Subject: [PATCH] ci: move to pnpm --- .github/workflows/nodejs.yml | 10 +++++++--- .github/workflows/npm-publish.yml | 14 +++++++++++--- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 24a3e236..abc5bb85 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -15,18 +15,22 @@ jobs: strategy: matrix: - node-version: ['18.13.0', '20'] + node-version: ['20', '18.13.0'] steps: - uses: actions/checkout@v4 + - name: Install pnpm + uses: pnpm/action-setup@v4 + with: + version: 9 - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} - name: Install dependencies - run: npm ci + run: pnpm install - name: Build run: | - npx nx run-many --target=build --all + pnpx nx run-many --target=build --all env: CI: true diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 57033fa0..6bc58a52 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -15,16 +15,24 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - name: Install pnpm + uses: pnpm/action-setup@v4 + with: + version: 9 - uses: actions/setup-node@v4 with: node-version: 18.13.0 - - run: npm ci + - run: pnpm install publish-npm: needs: build runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - name: Install pnpm + uses: pnpm/action-setup@v4 + with: + version: 9 - uses: actions/setup-node@v4 with: node-version: 18.13.0 @@ -32,8 +40,8 @@ jobs: scope: '@ngu' - name: Build and Publish run: | - npm ci - npx nx run-many --target=build --all + pnpm install + pnpx nx run-many --target=build --all cd dist/libs/ngu/carousel npm publish --access=public shell: bash