diff --git a/.forgejo/workflows/build-release.yml b/.forgejo/workflows/build-release.yml index 721f192..bdff9dc 100644 --- a/.forgejo/workflows/build-release.yml +++ b/.forgejo/workflows/build-release.yml @@ -17,12 +17,16 @@ jobs: id: vars run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT + - name: Get latest git tag + id: gitvar + run: echo "tag=$(git describe --tags $(git rev-list --tags --max-count=1))" >> $GITHUB_OUTPUT + - name: Set git tag description id: vars2 - run: echo "tag_desc=$(git for-each-ref --format='%(contents)' $GITHUB_REF)" >> $GITHUB_OUTPUT + run: echo "tag_desc=$(git for-each-ref --format='%(contents)' ${{ steps.gitvar.outputs.tag }})" >> $GITHUB_OUTPUT - name: Check outputs - run: echo "short ${{ steps.vars.outputs.sha_short }}, ref $GITHUB_REF, tag ${{ steps.vars2.outputs.tag_desc }}" + run: echo "short ${{ steps.vars.outputs.sha_short }}, ref $GITHUB_REF, tag ${{ steps.gitvar.outputs.tag }}, tag_desc ${{ steps.vars2.outputs.tag_desc }}" - name: Tag description run: git for-each-ref --format='%(contents)' $GITHUB_REF