We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 84b0f0a commit 6df2e56Copy full SHA for 6df2e56
1 file changed
.github/workflows/create-tag-from-version.yml
@@ -0,0 +1,32 @@
1
+name: Create tag from new version
2
+
3
+on:
4
+ workflow_dispatch:
5
+ workflow_call:
6
+ push:
7
+ paths:
8
+ - pyproject.toml
9
10
+permissions:
11
+ contents: write
12
13
+jobs:
14
+ setup-tag:
15
+ runs-on: "ubuntu-latest"
16
+ steps:
17
+ - name: Check out package
18
+ uses: actions/checkout@v4
19
20
+ - name: Get package version
21
+ run: |
22
+ VERSION=$(sed -n 's/^version = "\(.*\)"/\1/p' pyproject.toml)
23
+ echo "pyproject.toml version: $VERSION"
24
+ git config user.name github-actions
25
+ git config user.email github-actions@github.com
26
+ MSG=$(git log $(git describe --tags --abbrev=0)..HEAD --oneline)
27
+ echo "Creating tag $VERSION with message:"
28
+ echo "$MSG"
29
+ git tag -a "$VERSION" -m "$MSG"
30
31
+ - name: Publish tags
32
+ run: git push --tags
0 commit comments