checkout with tags helps
Some checks failed
/ Build and Test Library Snapshot (pull_request) Failing after 44s
Some checks failed
/ Build and Test Library Snapshot (pull_request) Failing after 44s
This commit is contained in:
parent
58565c7523
commit
41000b0bf7
2 changed files with 7 additions and 1 deletions
|
@ -18,6 +18,8 @@ jobs:
|
|||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
name: 'Checkout Repository'
|
||||
with:
|
||||
fetch-tags: true
|
||||
- name: 'Pre-Commit'
|
||||
run: |
|
||||
pre-commit install
|
||||
|
@ -35,7 +37,7 @@ jobs:
|
|||
else
|
||||
export GS_RELEASE_TYPE="patch"
|
||||
fi
|
||||
echo "Latest Git Tag: $latest_git_tag"
|
||||
echo "Previous Git Tag: $latest_git_tag"
|
||||
echo "Latest Commit: $latest_commit_message ($GS_RELEASE_TYPE) (SNAPSHOT)"
|
||||
sbtn -Dsnapshot=true -Drelease="$GS_RELEASE_TYPE" semVerInfo
|
||||
- name: 'Unit Tests and Code Coverage'
|
||||
|
|
|
@ -19,12 +19,15 @@ jobs:
|
|||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
name: 'Checkout Repository'
|
||||
with:
|
||||
fetch-tags: true
|
||||
- name: 'Pre-Commit'
|
||||
run: |
|
||||
pre-commit install
|
||||
pre-commit run --all-files
|
||||
- name: 'Prepare Versioned Build'
|
||||
run: |
|
||||
latest_git_tag="$(git describe --tags --abbrev=0)"
|
||||
latest_commit_message="$(git show -s --format=%s HEAD)"
|
||||
if [[ "$latest_commit_message" == *"(major)"* ]]; then
|
||||
export GS_RELEASE_TYPE="major"
|
||||
|
@ -35,6 +38,7 @@ jobs:
|
|||
else
|
||||
export GS_RELEASE_TYPE="patch"
|
||||
fi
|
||||
echo "Previous Git Tag: $latest_git_tag"
|
||||
echo "Latest Commit: $latest_commit_message"
|
||||
echo "Selected Release Type: '$GS_RELEASE_TYPE'"
|
||||
sbtn -Drelease="$GS_RELEASE_TYPE" semVerInfo
|
||||
|
|
Loading…
Add table
Reference in a new issue