Skip to content

Commit 6683eb8

Browse files
authored
Create create-tag.yml
1 parent 575ac8d commit 6683eb8

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

.github/workflows/create-tag.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Create tag from new version
2+
3+
on:
4+
push:
5+
paths:
6+
./pyproject.toml
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
setup-tag:
13+
runs-on: "ubuntu-latest"
14+
steps:
15+
- name: Check out SPM Python
16+
uses: actions/checkout@v4
17+
18+
- name: Get package version
19+
run: |
20+
VERSION=$(sed -n 's/^version = "\(.*\)"/\1/p' pyproject.toml)
21+
MSG=$(git log $(git describe --tags --abbrev=0)..HEAD --oneline)
22+
git tag -a "$VERSION" -m "$MSG"
23+
24+
- name: Publish tags
25+
run: git push --tags

0 commit comments

Comments
 (0)