File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 9090 COMMIT_SHA=$(git rev-parse HEAD)
9191 COMMIT_SHORT=$(git rev-parse --short HEAD)
9292 COMMIT_DATE=$(git log -1 --format=%cd --date=short)
93+ # Try to get the tag, if it exists
94+ TAG=$(git describe --tags --exact-match 2>/dev/null || echo "")
9395 echo "sha=$COMMIT_SHA" >> $GITHUB_OUTPUT
9496 echo "short=$COMMIT_SHORT" >> $GITHUB_OUTPUT
9597 echo "date=$COMMIT_DATE" >> $GITHUB_OUTPUT
98+ echo "tag=$TAG" >> $GITHUB_OUTPUT
9699
97100 - name : Organize native libraries for release
98101 run : |
@@ -121,7 +124,7 @@ jobs:
121124 - name : Create GitHub Release
122125 uses : softprops/action-gh-release@v1
123126 with :
124- name : ${{ github.ref_name }}
127+ name : ${{ steps.libssh2-info.outputs.tag || steps.libssh2-info.outputs.short }}
125128 body : |
126129 Built for libssh2@${{ steps.libssh2-info.outputs.short }} (committed on ${{ steps.libssh2-info.outputs.date }})
127130
You can’t perform that action at this time.
0 commit comments