Skip to content

Commit f0106cc

Browse files
authored
feat: #dev-deploy tag naming change
1 parent 367199c commit f0106cc

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

.github/workflows/dev.kodemy.deploy.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,9 +196,18 @@ jobs:
196196
- name: Determine new tag
197197
id: tag
198198
run: |
199-
new_tag="${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}"
200-
echo "New tag: $new_tag"
199+
tags=$(git tag -l)
200+
latest_tag=$(echo "$tags" | grep -E '^0\.0\.[0-9]+$' | sort -V | tail -n 1)
201201
202+
if [ -n "$latest_tag" ]; then
203+
version_number=$(echo "$latest_tag" | sed 's/^0\.0\.//')
204+
new_version=$((version_number + 1))
205+
new_tag="0.0.$new_version"
206+
else
207+
new_tag="0.0.1"
208+
fi
209+
210+
echo "New tag: $new_tag"
202211
echo "TAG_NAME=$new_tag" >> $GITHUB_ENV
203212

204213
- name: Create tag

0 commit comments

Comments
 (0)