File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change
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
[email protected]
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
You can’t perform that action at this time.
0 commit comments