-
Notifications
You must be signed in to change notification settings - Fork 4
34 lines (29 loc) · 878 Bytes
/
create-tag.yml
File metadata and controls
34 lines (29 loc) · 878 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: Create tag from new version
on:
workflow_dispatch:
workflow_call:
push:
branches:
- main
paths:
- spm/_version.py
permissions:
contents: write
jobs:
setup-tag:
runs-on: "ubuntu-latest"
steps:
- name: Check out SPM Python
uses: actions/checkout@v4
- name: Get package version
run: |
VERSION=$(sed -n 's/^__version__ = "\(.*\)"/\1/p' spm/_version.py)
echo "pyproject.toml version: $VERSION"
git config user.name github-actions
git config user.email github-actions@github.com
MSG=$(git log $(git describe --tags --abbrev=0)..HEAD --oneline)
echo "Creating tag $VERSION with message:"
echo "$MSG"
git tag -a "$VERSION" -m "$MSG"
- name: Publish tags
run: git push --tags