Split out publishing for usual CI job

This separate one is to be triggered manually for tags.

Keep it simple.
This commit is contained in:
Hugo Osvaldo Barrera 2022-11-20 15:30:21 +01:00
parent a4ef45095e
commit ed53e14af6
2 changed files with 27 additions and 9 deletions

View file

@ -5,11 +5,9 @@ packages:
- docker
- docker-compose
- python-pip
- twine
sources:
- https://github.com/pimutils/vdirsyncer
secrets:
- a36c8ba3-fba0-4338-b402-6aea0fbe771e
- 4d9a6dfe-5c8d-48bd-b864-a2f5d772c536
environment:
BUILD: test
@ -40,10 +38,3 @@ tasks:
cd vdirsyncer
export PATH=$PATH:~/.local/bin/
DAV_SERVER=fastmail pytest tests/storage
- check-tag: |
# Stop here unless this is a tag.
git describe --exact-match --tags || complete-build
- publish: |
cd vdirsyncer
python setup.py sdist bdist_wheel
twine upload dist/*

27
publish-release.yaml Normal file
View file

@ -0,0 +1,27 @@
# Run new version to PyPI.
#
# Usage: hut builds submit publish-release.yaml --follow
image: alpine/edge
packages:
- py3-pip
- py3-setuptools
- py3-wheel
- twine
sources:
- https://github.com/pimutils/vdirsyncer
secrets:
- a36c8ba3-fba0-4338-b402-6aea0fbe771e # PyPI token.
environment:
CI: true
tasks:
- check-tag: |
cd vdirsyncer
git fetch --tags
# Stop here unless this is a tag.
git describe --exact-match --tags || complete-build
- publish: |
cd vdirsyncer
python setup.py sdist bdist_wheel
twine upload dist/*