diff --git a/.github/actions/publish-release/action.yml b/.github/actions/publish-release/action.yml index 4f9ef2f6..08917e5d 100644 --- a/.github/actions/publish-release/action.yml +++ b/.github/actions/publish-release/action.yml @@ -31,7 +31,7 @@ runs: shell: bash - name: Get Next Release Version - id: tag_version + id: get_release_version run: | export NEXT_TAG_VERSION=$(npx semantic-release --dry-run | grep 'The next release version is' | sed -E 's/.* ([[:digit:].]+)$/\1/') echo "new_tag_version=${NEXT_TAG_VERSION}" >> $GITHUB_OUTPUT @@ -39,13 +39,13 @@ runs: - name: Semantic Release env: GITHUB_TOKEN: ${{ inputs.githubToken }} - if: ${{ new_tag_version != '' }} + if: ${{ steps.get_release_version.outputs.new_tag_version != '' }} run: npx semantic-release shell: bash - name: Publish to npm env: NODE_AUTH_TOKEN: ${{ inputs.npmToken }} - if: ${{ new_tag_version != '' }} + if: ${{ steps.get_release_version.outputs.new_tag_version != '' }} run: npm publish ./dist/*.tgz --tag ${{ inputs.branchName == 'main' && 'latest' || inputs.branchName }} shell: bash