Update calver.yml

This commit is contained in:
McCloudS
2025-02-06 10:43:57 -07:00
committed by GitHub
parent 061937c2ad
commit a519aa73cf

View File

@@ -16,9 +16,7 @@ jobs:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v3 uses: actions/checkout@v3
with: with:
# Fetch the full history
fetch-depth: 0 fetch-depth: 0
ref: main
- name: Calculate version - name: Calculate version
id: version id: version
@@ -44,8 +42,12 @@ jobs:
git add subgen.py git add subgen.py
git commit --amend --reuse-message=HEAD --author="${GIT_AUTHOR_NAME} <${GIT_AUTHOR_EMAIL}>" git commit --amend --reuse-message=HEAD --author="${GIT_AUTHOR_NAME} <${GIT_AUTHOR_EMAIL}>"
# Pull any remote changes # Pull and rebase. Handle potential conflicts.
git pull --rebase origin main # Use --rebase to avoid a merge commit git pull --rebase origin main || {
echo "Rebase failed! Resolving conflicts..."
git rebase --abort # Abort the rebase
exit 1 # Fail the job (optional)
}
# Push the amended commit # Push the amended commit
git push origin HEAD:main git push origin HEAD:main