Skip to content

Commit 44cab26

Browse files
committed
Use unique versions for testpypi
1 parent 9b1d164 commit 44cab26

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

.github/workflows/python-publish.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@ jobs:
3737
run: |
3838
python -m pip install --upgrade pip
3939
pip install setuptools build --user
40+
- name: Set unique version for TestPyPI
41+
if: github.event_name != 'release'
42+
run: |
43+
ACTUAL_VERSION=$(python3 -m setuptools_scm)
44+
echo "SETUPTOOLS_SCM_PRETEND_VERSION=${ACTUAL_VERSION}" >> $GITHUB_ENV
4045
- name: Build a binary wheel and a source tarball
4146
run: python3 -m build
4247
- name: Store the distribution packages

pyproject.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,10 @@ include = ["dfetch", "dfetch.*"]
117117
[tool.setuptools.package-data]
118118
dfetch = ["resources/*.yaml"]
119119

120+
[tool.setuptools_scm]
121+
version_scheme = "guess-next-dev"
122+
local_scheme = "node-and-timestamp"
123+
120124
[tool.isort]
121125
profile = "black"
122126

0 commit comments

Comments
 (0)