We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 01f63f7 commit 461adc5Copy full SHA for 461adc5
2 files changed
.github/workflows/python-app.yml
@@ -52,6 +52,9 @@ jobs:
52
pytest tests/
53
- run: pip install -U wheel build
54
- name: Build a binary wheel and a source tarball
55
+ env:
56
+ GITHUB_REF_TYPE: ${{ github.ref_type }}
57
+ GITHUB_REF_NAME: ${{ github.ref_name }}
58
run: python -m build
59
- name: Publish package distributions to PyPI
60
uses: pypa/gh-action-pypi-publish@release/v1
setup.py
@@ -2,7 +2,7 @@
2
import codecs
3
import os
4
5
-VERSION = '2.1.15b0'
+VERSION = ((os.getenv("GITHUB_REF_TYPE") == "tag" and os.getenv("GITHUB_REF_NAME")) or '2.1.15').removeprefix("v").removeprefix("V")
6
DESCRIPTION = 'A Scratch API Wrapper'
7
with open('README.md', encoding='utf-8') as f:
8
LONG_DESCRIPTION = f.read()
0 commit comments