From 1af534a81c2a2dc9fcdb15c4a42d9c85044ccf20 Mon Sep 17 00:00:00 2001 From: Maxim Koretskiy Date: Tue, 19 Dec 2023 12:01:54 +0300 Subject: [PATCH] chore: Use yarn in package script --- .github/workflows/npm-publish.yml | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 48f1302..b8cf80b 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -1,6 +1,3 @@ -# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created -# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages - name: Node.js Package on: @@ -14,9 +11,10 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-node@v2 with: - node-version: 12 - - run: npm ci - - run: npm test + node-version: 18 + cache: "yarn" + - run: yarn install --frozen-lockfile + - run: yarn test publish-npm: needs: build @@ -25,10 +23,10 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-node@v2 with: - node-version: 12 - registry-url: https://registry.npmjs.org/ - - run: npm ci - - run: npm publish + node-version: 18 + cache: "yarn" + - run: yarn install --frozen-lockfile + - run: yarn publish env: NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} @@ -39,9 +37,9 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-node@v2 with: - node-version: 12 - registry-url: https://npm.pkg.github.com/ - - run: npm ci - - run: npm publish + node-version: 18 + cache: "yarn" + - run: yarn install --frozen-lockfile + - run: yarn publish env: NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}