Skip to content

Commit

Permalink
feat(github-actions): add script to get latest tag for current commit
Browse files Browse the repository at this point in the history
Add a Bash script to retrieve the latest Git tag associated with the
current commit. The script configures Git user information, extracts
the current commit hash, finds any tags pointing at the commit, and
displays the most recent tag if available.

Assumptions:
- Tags are annotated and follow a time-based ordering.
  • Loading branch information
godcong committed Jul 10, 2024
1 parent 7837d0c commit a3df4a7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/tag_after_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ jobs:
- name: Determine next version
id: determine_next_version
run: |
chmod +x ./scripts/git/commit_tag.sh
LATEST_TAG=$(./scripts/git/commit_tag.sh)
if [[ -z "$LATEST_TAG" ]]; then
NEXT_TAG="v0.0.1"
Expand Down

0 comments on commit a3df4a7

Please sign in to comment.