Skip to content

Commit 97a263a

Browse files
committed
fix: fix release
1 parent d79221a commit 97a263a

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

.github/workflows/release.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
name: Tag and Release
22

33
on:
4-
workflow_dispatch: # Manual trigger
4+
push:
5+
branches:
6+
- main
57

68
jobs:
79
tag-and-release:
@@ -11,7 +13,7 @@ jobs:
1113
- name: Checkout code
1214
uses: actions/checkout@v4
1315
with:
14-
fetch-depth: 0 # Required for full git history
16+
fetch-depth: 0
1517

1618
- name: Set up Git user
1719
run: |
@@ -27,7 +29,9 @@ jobs:
2729
- name: Bump version and create new tag
2830
id: new_tag
2931
run: |
30-
IFS='.' read -r major minor patch <<< "${{ steps.get_tag.outputs.latest_tag#v }}"
32+
latest="${{ steps.get_tag.outputs.latest_tag }}"
33+
version="${latest#v}"
34+
IFS='.' read -r major minor patch <<< "$version"
3135
new_tag="v$major.$minor.$((patch + 1))"
3236
git tag "$new_tag"
3337
git push origin "$new_tag"

0 commit comments

Comments
 (0)