Skip to content

Commit

Permalink
fix(semantic-release): get previous tag from remote instead of local
Browse files Browse the repository at this point in the history
  • Loading branch information
EdieLemoine committed Sep 19, 2022
1 parent a6c667d commit 0ea0a59
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions semantic-release/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,9 @@ runs:
with:
token: ${{ inputs.token }}

- name: 'Fetch tags'
run: |
git fetch --tags
shell: bash

- name: 'Get previous version'
run: |
tag=$(git describe --tags --abbrev=0)
tag=$(git ls-remote --tags --sort="v:refname" | tail -n1 | sed 's/.*\///; s/\^{}//')
echo "::set-output name=previous-version::${tag}"
id: previous-version
shell: bash
Expand Down

0 comments on commit 0ea0a59

Please sign in to comment.