From 8da3b7e3bcce7b29127d92ae46eff4744371bc26 Mon Sep 17 00:00:00 2001 From: Igor Octaviano Date: Wed, 24 Jul 2024 21:54:04 -0300 Subject: [PATCH] Update ci scripts to use yarn --- .github/workflows/publish.yml | 8 ++++---- .github/workflows/unit-tests.yml | 16 +++++++--------- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 2d5fd1f..712b3ea 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,18 +1,18 @@ -name: Publish Package to npmjs +name: dmv/publis-to-npm on: release: types: [published] jobs: build: + name: Build and publish to npm runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - # Setup .npmrc file to publish to npm - uses: actions/setup-node@v4 with: node-version: "20.x" registry-url: "https://registry.npmjs.org" - - run: npm ci - - run: npm publish --access public + - run: yarn install --frozen-lockfile + - run: yarn npm publish --access public env: NODE_AUTH_TOKEN: ${{ secrets.NPM_DMV_GRANULAR }} diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 5115fe4..5a173a7 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -1,6 +1,4 @@ -# This workflow will install JavaScript dependencies, run tests and lint. - -name: unit tests +name: dmv/build-and-unit-tests on: push: @@ -14,7 +12,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node-version: ["12.x", "14.x", "16.x"] + node-version: ["16.x", "20.x"] steps: - uses: actions/checkout@v2 @@ -22,12 +20,12 @@ jobs: uses: actions/setup-node@v2 with: node-version: ${{ matrix.node-version }} - cache: "npm" + cache: "yarn" - name: Install dependencies - run: npm install + run: yarn - name: Build package in production mode - run: npm run build + run: yarn build - name: Lint with standard - run: npm run lint + run: yarn lint - name: Test with jest - run: npm run test + run: yarn test