From bc76ee123dd0aa43ee8cce94a910a570cda29760 Mon Sep 17 00:00:00 2001 From: Trezy Date: Fri, 12 Jul 2024 21:44:01 -0500 Subject: [PATCH] ci: fix release version checking --- .github/actions/publish-release/action.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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