From af04143877ebd41279ccc6a8fc12b35aad6a9f9c Mon Sep 17 00:00:00 2001 From: AJAL ODORA JONATHAN <43242517+ODORA0@users.noreply.github.com> Date: Tue, 28 Jan 2025 10:29:12 +0300 Subject: [PATCH] (fix) Separated the Git Config and Bump Patch Version and Publish into two distinct steps (#17) --- .github/workflows/node.js.yml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 1e6c9e7..4f775bd 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -53,19 +53,19 @@ jobs: - run: yarn install --immutable - name: Git Config run: | - git config user.name "GitHub Actions Bot" - git config user.email "github-actions[bot]@users.noreply.github.com" - - name: Bump Patch Version and Publish - run: | - echo "Bumping patch version for main branch..." - git pull origin main - yarn plugin import version - yarn version patch --message "chore: bump version to %s [skip ci]" - echo "Version bumped to: $(node -p \"require('./package.json').version\")" - git push --follow-tags - echo "Publishing patch release to NPM..." - yarn config set npmAuthToken "${NODE_AUTH_TOKEN}" - yarn npm publish --access public + git config --global user.name "GitHub Actions Bot" + git config --global user.email "github-actions[bot]@users.noreply.github.com" + - name: Bump Patch Version and Publish + run: | + echo "Bumping patch version for main branch..." + git pull origin main + yarn plugin import version + yarn version patch --message "chore: bump version to %s [skip ci]" + echo "Version bumped to: $(node -p \"require('./package.json').version\")" + git push --follow-tags + echo "Publishing patch release to NPM..." + yarn config set npmAuthToken "${NODE_AUTH_TOKEN}" + yarn npm publish --access public env: NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}