Skip to content

Commit ec2e04e

Browse files
authored
Update python-publish.yml with auto version from tag
1 parent 3fad9a6 commit ec2e04e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

.github/workflows/python-publish.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@ jobs:
3030
run: |
3131
python -m pip install --upgrade pip
3232
pip install build
33+
- name: Extract tag name
34+
id: tag
35+
run: echo ::set-output name=TAG_NAME::$(echo $GITHUB_REF | cut -d / -f 3)
36+
- name: Update version in pyproject.toml
37+
run: >-
38+
sed -i "s/{{VERSION_PLACEHOLDER}}/${{ steps.tag.outputs.TAG_NAME }}/g" pyproject.toml
3339
- name: Build package
3440
run: python -m build
3541
- name: Publish package

0 commit comments

Comments
 (0)