Skip to content

Commit 5631ac3

Browse files
committed
ci: add workflow create-tag
1 parent 9b23413 commit 5631ac3

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.github/workflows/create-tag.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Tag on commits
2+
3+
on:
4+
push:
5+
branches:
6+
- release
7+
8+
jobs:
9+
tag:
10+
runs-on: ubuntu-latest
11+
12+
permissions:
13+
contents: write
14+
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v4
18+
with:
19+
ref: ${{ github.ref }}
20+
21+
- name: Install svu
22+
run: |
23+
wget https://github.com/caarlos0/svu/releases/download/v3.2.2/svu_3.2.2_linux_amd64.tar.gz
24+
tar -xzf svu_3.2.2_linux_amd64.tar.gz
25+
sudo mv svu /usr/local/bin/
26+
sudo chmod +x /usr/local/bin/svu
27+
28+
- name: Get tag
29+
run: |
30+
TAG=$(svu next)
31+
echo "TAG=${TAG}" >> $GITHUB_ENV
32+
33+
- name: Create tag
34+
run: |
35+
git config user.name "GitHub Actions"
36+
git config user.email "[email protected]"
37+
git tag ${TAG}
38+
git push origin ${TAG}

0 commit comments

Comments
 (0)