Skip to content

Commit cdec748

Browse files
committed
Add Polyfill for crypto.randomUUID dk-build #3
1 parent 5b95e0b commit cdec748

File tree

1 file changed

+15
-14
lines changed

1 file changed

+15
-14
lines changed

.github/workflows/release.yml

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,27 +21,29 @@ jobs:
2121
- name: Determine version strategy
2222
id: determine_version
2323
run: |
24-
if git rev-parse "refs/tags/" >/dev/null 2>&1; then
25-
# Tags exist, use existing strategy
26-
latest_tag=$(git describe --tags --abbrev=0)
27-
echo "Latest tag: $latest_tag"
24+
latest_tag=$(git describe --tags $(git rev-list --tags --max-count=1))
25+
echo "Latest tag: $latest_tag"
2826
27+
if [ -z "$latest_tag" ]; then
28+
# No tags, start with initial version
29+
major=0
30+
minor=1
31+
patch=0
32+
else
33+
# Tags exist, use existing strategy
2934
IFS='.' read -r -a parts <<< "${latest_tag//v/}"
3035
major=${parts[0]}
3136
minor=${parts[1]}
3237
patch=${parts[2]}
3338
3439
# Increment the patch version
3540
new_patch=$((patch + 1))
36-
new_tag="v$major.$minor.$new_patch"
37-
else
38-
# No tags, start with initial version
39-
major=0
40-
minor=1
41-
patch=0
42-
new_tag="v$major.$minor.$patch"
41+
major=${major:-0}
42+
minor=${minor:-0}
43+
patch=${patch:-0}
4344
fi
4445
46+
new_tag="v$major.$minor.$new_patch"
4547
echo "New tag: $new_tag"
4648
echo "new_tag=$new_tag" >> $GITHUB_ENV
4749
@@ -50,8 +52,7 @@ jobs:
5052
run: |
5153
while git rev-parse "refs/tags/${{ env.new_tag }}" >/dev/null 2>&1; do
5254
echo "Tag ${{ env.new_tag }} already exists."
53-
54-
# Increment the patch version
55+
5556
IFS='.' read -r -a parts <<< "${new_tag//v/}"
5657
major=${parts[0]}
5758
minor=${parts[1]}
@@ -67,7 +68,7 @@ jobs:
6768
- name: Create new tag
6869
run: |
6970
git tag "${{ env.new_tag }}"
70-
git push --tags
71+
git push origin "${{ env.new_tag }}"
7172
7273
- name: Create GitHub release
7374
uses: actions/create-release@v1

0 commit comments

Comments
 (0)