Skip to content

Commit 607b7b4

Browse files
committed
upgrade release approach
1 parent 83d7171 commit 607b7b4

File tree

1 file changed

+23
-4
lines changed

1 file changed

+23
-4
lines changed

.github/workflows/pipeline.yml

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88

99
permissions:
1010
contents: write
11-
11+
1212
jobs:
1313
build:
1414
runs-on: ubuntu-latest
@@ -127,17 +127,36 @@ jobs:
127127
run: |
128128
FULL_VERSION=$(cat VERSION)
129129
VERSION=$(echo "$FULL_VERSION" | cut -d '-' -f1)
130+
COMMIT=$(git rev-parse HEAD)
131+
130132
echo "🚀 Creating release: $VERSION"
133+
echo "🔁 Commit: $COMMIT"
134+
echo "📦 Based on build: $FULL_VERSION"
131135
132136
git config user.name "GitHub Actions"
133137
git config user.email "[email protected]"
134138
135-
git tag "$VERSION"
136-
git push origin "$VERSION"
139+
# Crear tag si no existe aún
140+
if git rev-parse "$VERSION" >/dev/null 2>&1; then
141+
echo "⚠️ Tag $VERSION already exists. Skipping tag creation."
142+
else
143+
git tag "$VERSION"
144+
git push origin "$VERSION"
145+
fi
146+
147+
echo "🔍 Generating changelog..."
148+
CHANGELOG="🔖 Version: $VERSION
137149
138-
CHANGELOG=$(git log --pretty=format:"- %s (%an)" $(git describe --tags --abbrev=0)..HEAD)
150+
🔍 Based on internal build: $FULL_VERSION
151+
🔀 Commit: $COMMIT
139152
153+
📋 Changes:
154+
$(git log --pretty=format:"- %s (%an)" $(git describe --tags --abbrev=0)..HEAD)"
155+
156+
echo "🧹 Deleting release if already exists..."
140157
gh release delete "$VERSION" -y || true
158+
159+
echo "📦 Creating GitHub release..."
141160
gh release create "$VERSION" --title "$VERSION" --notes "$CHANGELOG"
142161
143162
- name: Notify Telegram - success

0 commit comments

Comments
 (0)