From af24f95d8523c4567360e40d194e1378d4d3571e Mon Sep 17 00:00:00 2001 From: Arda TANRIKULU Date: Wed, 27 May 2020 15:00:03 +0300 Subject: [PATCH] Fix NPM release workflow --- .github/workflows/release.yml | 6 ++++-- scripts/release.js | 7 ++----- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e916595e5cd..eba0f12b741 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,9 +23,11 @@ jobs: - name: Use Node uses: actions/setup-node@v1 with: - # Setup .npmrc file to publish to npm node-version: '14.x' - registry-url: 'https://registry.npmjs.org/:_authToken=${{ secrets.NODE_AUTH_TOKEN }}' + - name: Setup NPM credentials + run: echo "//registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN" >> ~/.npmrc + env: + NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }} - name: Get yarn cache id: yarn-cache run: echo "::set-output name=dir::$(yarn cache dir)" diff --git a/scripts/release.js b/scripts/release.js index 6d44d4293c8..d74d84e4947 100644 --- a/scripts/release.js +++ b/scripts/release.js @@ -6,9 +6,6 @@ const semver = require('semver'); const cp = require('child_process'); const rootPackageJson = require('../package.json'); const { cwd } = require('process'); -const pLimit = require('p-limit'); - -const useLimit = pLimit(3); async function release() { @@ -34,7 +31,7 @@ async function release() { rootPackageJson.version = version; await writeFile(resolve(__dirname, '../package.json'), JSON.stringify(rootPackageJson, null, 2)); - await Promise.all(packageJsonPaths.map(packageJsonPath => useLimit(async () => { + await Promise.all(packageJsonPaths.map(async packageJsonPath => { const packageJson = require(packageJsonPath); packageJson.version = version; for (const dependency in packageJson.dependencies) { @@ -80,7 +77,7 @@ async function release() { }); }); } - }))); + })) console.info(`Released successfully!`); console.info(`${tag} => ${version}`); }