mirror of
https://github.com/remsky/Kokoro-FastAPI.git
synced 2025-08-05 16:48:53 +00:00
Add tag existence check in release workflow
This commit is contained in:
parent
10caafe3fb
commit
10f240daad
1 changed files with 16 additions and 1 deletions
17
.github/workflows/release.yml
vendored
17
.github/workflows/release.yml
vendored
|
@ -38,8 +38,23 @@ jobs:
|
|||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0 # Needed to check for existing tags
|
||||
|
||||
- name: Free disk space # Optional: Keep if needed for large builds
|
||||
- name: Check if tag already exists
|
||||
run: |
|
||||
TAG_NAME="${{ needs.prepare-release.outputs.version_tag }}"
|
||||
echo "Checking for existing tag: $TAG_NAME"
|
||||
# Fetch tags explicitly just in case checkout didn't get them all
|
||||
git fetch --tags
|
||||
if git rev-parse "$TAG_NAME" >/dev/null 2>&1; then
|
||||
echo "::error::Tag $TAG_NAME already exists. Please increment the version in the VERSION file."
|
||||
exit 1
|
||||
else
|
||||
echo "Tag $TAG_NAME does not exist. Proceeding with release."
|
||||
fi
|
||||
|
||||
- name: Free disk space # Optional: Keep as needed for large builds
|
||||
run: |
|
||||
echo "Listing current disk space"
|
||||
df -h
|
||||
|
|
Loading…
Add table
Reference in a new issue