From 37a2d743a553db673a4c1385ff328ac2269aa384 Mon Sep 17 00:00:00 2001 From: Giulio Zanchetta Date: Sun, 17 Sep 2023 16:45:05 +0200 Subject: [PATCH] Refactor npm package installation and publishing - Removed the installation of pnpm globally - Replaced "pnpm install" with "npm install" for build checking - Removed the setup of pnpm in the second job - Replaced "pnpm add can-npm-publish --save-dev" with "npm install can-npm-publish --save-dev" - Updated the publish command to use npm instead of pnpm --- .github/workflows/publish.yml | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index e285894..b9a11ac 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -15,10 +15,8 @@ jobs: uses: actions/setup-node@v3 with: node-version: 18.x - - name: "Install pnpm" - run: npm install -g pnpm - name: "Check build" - run: pnpm install + run: npm install bump-version: needs: build @@ -65,19 +63,13 @@ jobs: uses: actions/setup-node@v3 with: node-version: 18.x - - name: "Install pnpm" - run: | - npm install -g pnpm - pnpm setup - env: - SHELL: bash - name: "Install can-npm-publish" run: | - pnpm add can-npm-publish --save-dev + npm install can-npm-publish --save-dev - name: Setup .temp-npmrc file to authenticate with npm run: | echo "//registry.npmjs.org/:_authToken=${{ env.NPM_TOKEN }}" > .temp-npmrc - name: "Git status check" run: git status - name: "Publish package if needed" - run: npx can-npm-publish --verbose && pnpm publish --no-git-checks --userconfig .temp-npmrc || echo "Does not publish" + run: npx can-npm-publish --verbose && npm publish --no-git-checks --userconfig .temp-npmrc || echo "Does not publish"