Skip to content

Commit 43a6ff8

Browse files
authored
Update create-tag workflow with English descriptions
1 parent e26ba3e commit 43a6ff8

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

.github/workflows/create-tag.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Create Git Tag
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
tag_name:
7+
description: "Tag name (eg. v1.3.0)"
8+
required: true
9+
type: string
10+
11+
permissions:
12+
contents: write
13+
14+
jobs:
15+
create_tag:
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v4
21+
with:
22+
fetch-depth: 0 # serve per i tag
23+
24+
- name: Configure Git
25+
run: |
26+
git config user.name "github-actions[bot]"
27+
git config user.email "github-actions[bot]@users.noreply.github.com"
28+
29+
- name: Check if the tag is already existing
30+
run: |
31+
TAG="${{ inputs.tag_name }}"
32+
git fetch --tags
33+
if git rev-parse -q --verify "refs/tags/$TAG" >/dev/null; then
34+
echo "❌ Tag $TAG esiste già"
35+
exit 1
36+
fi
37+
38+
- name: Create and push the tag
39+
run: |
40+
TAG="${{ inputs.tag_name }}"
41+
git tag "$TAG"
42+
git push origin "$TAG"

0 commit comments

Comments
 (0)