|
@@ -68,13 +68,28 @@ runs:
|
|
|
git fetch --tags --force
|
|
git fetch --tags --force
|
|
|
|
|
|
|
|
if ! git rev-parse "$TAG_NAME" >/dev/null 2>&1; then
|
|
if ! git rev-parse "$TAG_NAME" >/dev/null 2>&1; then
|
|
|
- echo "Tag '$TAG_NAME' not found. Creating backdated release..."
|
|
|
|
|
|
|
+ echo "Tag '$TAG_NAME' not found. Creating backdated tag..."
|
|
|
GIT_COMMITTER_DATE="2015-01-01T12:00:00" git tag -a "$TAG_NAME" -m "General Cache Storage"
|
|
GIT_COMMITTER_DATE="2015-01-01T12:00:00" git tag -a "$TAG_NAME" -m "General Cache Storage"
|
|
|
if git push origin "$TAG_NAME" --force; then
|
|
if git push origin "$TAG_NAME" --force; then
|
|
|
- gh release create "$TAG_NAME" --title "General Cache" --notes "Automated storage for build assets" --repo "$TARGET_REPO" || true
|
|
|
|
|
|
|
+ echo "Tag pushed"
|
|
|
else
|
|
else
|
|
|
echo "Push failed, tag might have been created by a parallel job. Continuing..."
|
|
echo "Push failed, tag might have been created by a parallel job. Continuing..."
|
|
|
fi
|
|
fi
|
|
|
|
|
+ else
|
|
|
|
|
+ echo "Tag '$TAG_NAME' exists locally."
|
|
|
|
|
+ fi
|
|
|
|
|
+ if ! gh release view "$TAG_NAME" --repo "$TARGET_REPO" >/dev/null 2>&1; then
|
|
|
|
|
+ echo "Release '$TAG_NAME' not found. Creating release..."
|
|
|
|
|
+ # ensure tag is pushed before creating release
|
|
|
|
|
+ git push origin "$TAG_NAME" --force >/dev/null 2>&1 || true
|
|
|
|
|
+ gh release create "$TAG_NAME" --title "General Cache" --notes "Automated storage for build assets" --repo "$TARGET_REPO" || true
|
|
|
|
|
+ # verify
|
|
|
|
|
+ if gh release view "$TAG_NAME" --repo "$TARGET_REPO" >/dev/null 2>&1; then
|
|
|
|
|
+ echo "Release '$TAG_NAME' created."
|
|
|
|
|
+ else
|
|
|
|
|
+ echo "⚠ Failed to create release '$TAG_NAME' — will retry upload anyway"
|
|
|
|
|
+ gh release view "$TAG_NAME" --repo "$TARGET_REPO" 2>&1 | head -n 20 || true
|
|
|
|
|
+ fi
|
|
|
else
|
|
else
|
|
|
echo "Release '$TAG_NAME' already exists. Ready for upload."
|
|
echo "Release '$TAG_NAME' already exists. Ready for upload."
|
|
|
fi
|
|
fi
|