Skip to content

Commit

Permalink
fix: fetching correct tag for previous version
Browse files Browse the repository at this point in the history
  • Loading branch information
j-i-l committed May 23, 2024
1 parent dcc2460 commit 55ba4eb
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/initiate_version_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
# first fetch all the tags
git fetch --filter=tree:0 origin +refs/tags/*:refs/tags/*
echo "VERSION=`echo $(echo '${{ github.ref_name }}'|grep -Eo '[0-9]+.[0-9]+.[0-9]+')`" >> $GITHUB_OUTPUT
echo "PREVIOUS_VERSION=`echo $(git tag --list | grep -E '[0-9]+.[0-9]+.[0-9]+$' | tail -n1)`" >> $GITHUB_OUTPUT
echo "PREVIOUS_VERSION=`echo $(git tag --list --sort=version:refname | grep -E '^[0-9]+.[0-9]+.[0-9]+$' | tail -n1)`" >> $GITHUB_OUTPUT
echo "AUTHOR=`echo $(git log -1 --pretty=%an)`" >> $GITHUB_OUTPUT
- name: Get git-chglog and update CHANGELOG
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish_version_enforce.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ jobs:
run: |
git fetch --filter=tree:0 origin +refs/tags/*:refs/tags/*
echo "VERSION=$(echo ${{ github.ref_name }}|grep -Eo '[0-9]+.[0-9]+.[0-9]+')" >> $GITHUB_OUTPUT
echo "PREVIOUS_VERSION=`echo $(git tag --list | grep -E '[0-9]+.[0-9]+.[0-9]+$' | tail -n1)`" >> $GITHUB_OUTPUT
echo "PREVIOUS_VERSION=`echo $(git tag --list --sort=version:refname | grep -E '^[0-9]+.[0-9]+.[0-9]+$' | tail -n1)`" >> $GITHUB_OUTPUT
cat $GITHUB_OUTPUT
- name: Remove previous releases of the target tag, if existing # 2
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish_version_merging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ jobs:
run: |
git fetch --filter=tree:0 origin +refs/tags/*:refs/tags/*
echo "VERSION=$(echo ${{ github.head_ref }}|grep -Eo '[0-9]+.[0-9]+.[0-9]+')" >> $GITHUB_OUTPUT
echo "PREVIOUS_VERSION=`echo $(git tag --list | grep -E '[0-9]+.[0-9]+.[0-9]+$' | tail -n1)`" >> $GITHUB_OUTPUT
echo "PREVIOUS_VERSION=`echo $(git tag --list --sort=version:refname | grep -E '^[0-9]+.[0-9]+.[0-9]+$' | tail -n1)`" >> $GITHUB_OUTPUT
- name: Remove previous releases of the target tag, if existing
if: ${{ steps.published.outputs.labeled == 'false' }}
run: |
Expand Down

0 comments on commit 55ba4eb

Please sign in to comment.