We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d79221a commit 97a263aCopy full SHA for 97a263a
.github/workflows/release.yml
@@ -1,7 +1,9 @@
1
name: Tag and Release
2
3
on:
4
- workflow_dispatch: # Manual trigger
+ push:
5
+ branches:
6
+ - main
7
8
jobs:
9
tag-and-release:
@@ -11,7 +13,7 @@ jobs:
11
13
- name: Checkout code
12
14
uses: actions/checkout@v4
15
with:
- fetch-depth: 0 # Required for full git history
16
+ fetch-depth: 0
17
18
- name: Set up Git user
19
run: |
@@ -27,7 +29,9 @@ jobs:
27
29
- name: Bump version and create new tag
28
30
id: new_tag
31
- 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"
35
new_tag="v$major.$minor.$((patch + 1))"
36
git tag "$new_tag"
37
git push origin "$new_tag"
0 commit comments