From b5aeacfca2ee1d531018648bdae4685603f3c5b0 Mon Sep 17 00:00:00 2001 From: Rinat Arsaev <11846445+A77AY@users.noreply.github.com> Date: Thu, 27 Mar 2025 16:52:38 +0700 Subject: [PATCH] Refactor npm version command to use GITHUB_SHA for prerelease tagging --- publish/action.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/publish/action.yml b/publish/action.yml index 4e77009..f35adcf 100644 --- a/publish/action.yml +++ b/publish/action.yml @@ -37,8 +37,7 @@ runs: if [ "${{ inputs.npm-version-tag }}" != "" ]; then PREFIX="${{ inputs.npm-version-tag }}-${{ github.event.number }}-" fi - SHA=$(echo "${{ github.event.pull_request.head.sha }}" | cut -c1-7) - npm version prerelease --preid "${PREFIX}${SHA}" --no-git-tag-version + npm version prerelease --preid "${PREFIX}${GITHUB_SHA::7}" --no-git-tag-version shell: bash env: NODE_AUTH_TOKEN: ${{ inputs.npm-token }}