Closed mikelnick closed 2 years ago
please take example in the production releases of setuptools-scm - those are done off tags
That was my assumption as well. I am using Gitlab CI, and the default branch name is main
. It doesn't seem to be working the way I thought. It might be due to those two factors.
@mikelnick releases on gilab should work the same way, do you prohibit running the pipelines on tags by chance (and are tags protected or not)
I was just trying to block running on main without dedicated tag and have .dev* releases for non main/tag. Tags are not protected. It felt like I needed to supply some value to the "Release". The other thing I tried was changing the regex, but I was following conventional v1.0.0
semver when creating tags.
Dev:
script:
- pip install --upgrade twine build
- python3 -m build
- TWINE_PASSWORD=${CI_JOB_TOKEN} TWINE_USERNAME=gitlab-ci-token python -m twine upload --repository-url ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/pypi dist/*
except:
refs:
- main
- tags
Release:
script:
- pip install --upgrade twine build
- python3 -m build
- TWINE_PASSWORD=${CI_JOB_TOKEN} TWINE_USERNAME=gitlab-ci-token python -m twine upload --repository-url ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/pypi dist/*
only:
refs:
- tags
Nothing springs to the eye at first, more details needed
Thank you so much for taking the time to respond. I tried to reproduce it and now it works with a new repo. I feel like a jerk. Thank you again.
I am very green with python packaging.
Is there no way to just publish the value
python -m setuptools_scm --strip-dev
for production package releases? This is such a great tool and it seems like if I want to create a tag on my repo and have it publish a "clean" version it should work with a config param but I am not seeing how to do this. I know this isn't a support board but it seems like a documentation miss.This will set version to
3.0.1.dev5
This will set version to
3.0.1.dev5+g449642a.d20220302
How do you use this tool and have version set to
3.0.1
?