File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Create Tag
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+
8+ concurrency :
9+ group : " ${{ github.ref }}"
10+ cancel-in-progress : true
11+
12+ jobs :
13+ create-tag :
14+ runs-on : ubuntu-latest
15+ timeout-minutes : 60
16+ permissions : write-all
17+ env :
18+ GIT_STRATEGY : clone
19+ steps :
20+ - name : Checkout repo
21+ uses : actions/checkout@v4
22+ with :
23+ fetch-depth : 20
24+ lfs : true
25+ - name : Get new version
26+ run : |
27+ git fetch --tags
28+ latest_tag=$(git describe --tags $(git rev-list --tags --max-count=1))
29+ IFS='.' read -r. -a parts <<< "${latest_tag}"
30+ ((parts[1]++))
31+ new_tag="${parts[0]}.${parts[1]}"
32+ echo "${new_tag}" : $VERSION
33+ - name : Create release
34+ uses : actions/create-release@v1
35+ env :
36+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
37+ with :
38+ tag_name : ${{ vars.VERSION }}
You can’t perform that action at this time.
0 commit comments