diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5c65bfbde95..d872457dab7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -40,9 +40,10 @@ jobs: result-encoding: string script: | const fullTag = "${{ inputs.tag }}" || context.payload.release.tag_name; - const firstMinusIndex = fullTag.indexOf('-'); - if (firstMinusIndex !== -1) { - return fullTag.substring(firstMinusIndex); + if (fullTag.includes('-')) { + const [, fullSuffix] = fullTag.split('-'); + const [suffix] = fullSuffix.split('.'); + return suffix; } else { return ''; } @@ -57,6 +58,11 @@ jobs: const [, major, minor] = tag.match(/^v([0-9]+)\.([0-9]+)/); return (tag.includes('-') ? `${major}.${minor}${{steps.suffix.outputs.result}}` : 'latest'); + - name: Show NPM release tag + run: | + echo "NPM suffix: ${{ steps.suffix.outputs.result }}" + echo "NPM release tag: ${{ steps.tag.outputs.result }}" + - name: Configure AWS credentials and bucket region uses: aws-actions/configure-aws-credentials@v4 with: