From 982cec6b72c264aa28d532e627397acafac56f88 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 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/actions/publish-release/action.yml b/.github/actions/publish-release/action.yml index 4f9ef2f6..e711e5da 100644 --- a/.github/actions/publish-release/action.yml +++ b/.github/actions/publish-release/action.yml @@ -31,21 +31,22 @@ 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 + shell: bash - 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