Skip to content

Commit

Permalink
chore: automate release building
Browse files Browse the repository at this point in the history
- make release-test builds a release build and publishes to pypi-test
- make release builds a release and publishes to pypi
  • Loading branch information
miraculixx committed Jan 8, 2025
1 parent 4aa619d commit 205c3ae
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,19 @@ dist: bump-build
rm -rf ./dist/*
rm -rf ./build/*
# set DISTTAGS to specify eg --python-tag for bdist
pip install -U setuptools build
python -m build
twine check dist/*.whl

release: test dist
bash -c "grep -qE '(-rc|-dev)' bogrod/VERSION && echo 'must be a final release. run make bump-release first'"
bash -c "git checkout -b release-$(cat bogrod/VERSION); git add .; git commit -m 'build release'; git push"
twine upload --skip-existing --repository pypi-productaize dist/*gz dist/*whl

release-test: test dist
release-test: dist
# upload and install
bash -c "grep -qE '(-rc)' bogrod/VERSION && echo 'must be a release candidate (-rcc). run make bump-release first'"
bash -c "git checkout -b build-$(cat bogrod/VERSION); git add .; git commit -m 'build release test'; git push"
twine upload --repository testpypi-productaize dist/*gz dist/*whl
pip install -U --pre -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ bogrod
bogrod --version
Expand Down

0 comments on commit 205c3ae

Please sign in to comment.