10BC0
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 3fec560 commit 7ef7c61Copy full SHA for 7ef7c61
.github/workflows/auto-tag.yml
@@ -0,0 +1,40 @@
1
+name: Auto Tag on Version Bump
2
+
3
+on:
4
+ push:
5
+ branches:
6
+ - master
7
+ paths:
8
+ - VERSION
9
10
+jobs:
11
+ tag-repo:
12
+ runs-on: ubuntu-latest
13
+ permissions:
14
+ contents: write
15
+ steps:
16
+ - name: Check out repository
17
+ uses: actions/checkout@v5
18
19
+ - name: Get current version
20
+ id: version
21
+ run: |
22
+ VERSION=$(cat VERSION)
23
+ echo "version=$VERSION" >> $GITHUB_OUTPUT
24
25
+ - name: Check if tag already exists
26
+ id: checktag
27
28
+ if git rev-parse "v${{ steps.version.outputs.version }}" >/dev/null 2>&1; then
29
+ echo "skip=true" >> $GITHUB_OUTPUT
30
+ else
31
+ echo "skip=false" >> $GITHUB_OUTPUT
32
+ fi
33
34
+ - name: Push tag
35
+ if: steps.checktag.outputs.skip == 'false'
36
37
+ git config user.name "github-actions[bot]"
38
+ git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
39
+ git tag "v${{ steps.version.outputs.version }}"
40
+ git push origin "v${{ steps.version.outputs.version }}"