Skip to content

Commit

Permalink
ci: fix release version checking
Browse files Browse the repository at this point in the history
  • Loading branch information
trezy committed Jul 13, 2024
1 parent 092d888 commit bc76ee1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/actions/publish-release/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,21 +31,21 @@ 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
- 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

0 comments on commit bc76ee1

Please sign in to comment.