Skip to content

[Enh] Version now specified in spm/_version.py #7

[Enh] Version now specified in spm/_version.py

[Enh] Version now specified in spm/_version.py #7

Workflow file for this run

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 [email protected]
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