Skip to content

Commit 5891c09

Browse files
committed
refactor(release): move tag creation step in workflow to a later stage
1 parent 41fcced commit 5891c09

File tree

1 file changed

+16
-14
lines changed

1 file changed

+16
-14
lines changed

.github/workflows/release.yml

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -69,20 +69,6 @@ jobs:
6969
- name: Set up Bun
7070
uses: oven-sh/setup-bun@v1
7171

72-
- name: Create release tag
73-
run: |
74-
set -e
75-
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
76-
git config --local user.name "github-actions[bot]"
77-
78-
if git tag -l "v$VERSION" | grep -q "v$VERSION"; then
79-
echo "⚠️ Tag v$VERSION already exists, skipping tag creation"
80-
else
81-
git tag "v$VERSION"
82-
git push origin "v$VERSION"
83-
echo "✅ Created and pushed tag v$VERSION"
84-
fi
85-
8672
- name: Update manifest.json version and Docker image
8773
run: |
8874
set -e
@@ -93,6 +79,8 @@ jobs:
9379
- name: Commit manifest update
9480
run: |
9581
set -e
82+
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
83+
git config --local user.name "github-actions[bot]"
9684
git add manifest.json
9785
if git diff --staged --quiet; then
9886
echo "ℹ️ No changes to commit"
@@ -102,6 +90,20 @@ jobs:
10290
echo "✅ Committed manifest.json update"
10391
fi
10492
93+
- name: Create release tag
94+
run: |
95+
set -e
96+
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
97+
git config --local user.name "github-actions[bot]"
98+
99+
if git tag -l "v$VERSION" | grep -q "v$VERSION"; then
100+
echo "⚠️ Tag v$VERSION already exists, skipping tag creation"
101+
else
102+
git tag "v$VERSION"
103+
git push origin "v$VERSION"
104+
echo "✅ Created and pushed tag v$VERSION"
105+
fi
106+
105107
- name: Set up Docker Buildx
106108
uses: docker/setup-buildx-action@v3
107109

0 commit comments

Comments
 (0)