Skip to content

Commit

Permalink
Merge pull request #9 from generalui/tooling
Browse files Browse the repository at this point in the history
Get previous version before pushing new tag
  • Loading branch information
jonryser authored Oct 3, 2024
2 parents 55a4522 + c642ff9 commit e20aa8f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,18 +140,18 @@ jobs:
echo "New Tag: ${version_tag}"
echo "::endgroup::"
git checkout ${{ steps.info.outputs.branch }}
git tag "${version_tag}"
git push origin tag "${version_tag}"
# Get all tags sorted by version, filtered by the module name
previous_tag=$(git tag --sort=-v:refname | grep -E "^[0-9]+\.[0-9]+\.[0-9]+-${module_name}$" | sed -n '2p')
previous_tag=$(git tag --sort=-v:refname | grep -E "^[0-9]+\.[0-9]+\.[0-9]+-${module_name}$" | head -n 1)
echo "previous_tag=${previous_tag}" >> $GITHUB_OUTPUT
echo "::group::Previous Tag"
echo "Previous Tag: ${previous_tag}"
echo "::endgroup::"
git checkout ${{ steps.info.outputs.branch }}
git tag "${version_tag}"
git push origin tag "${version_tag}"
shell: bash

- name: Create/Update CHANGELOG
Expand Down

0 comments on commit e20aa8f

Please sign in to comment.