.gitbay/ci.yml

15 lines · 625 bytes

 1# Tag-triggered PyPI publish, ported from the GitHub workflow (which used
 2# OIDC trusted publishing; here twine authenticates with the PYPI_TOKEN
 3# build secret).
 4jobs:
 5  publish:
 6    tags: "v*"
 7    steps:
 8      - |
 9        set -e
10        [ -n "$PYPI_TOKEN" ] || { echo "PYPI_TOKEN secret not set: printf %s TOKEN | gitbay repo secret set <repo> PYPI_TOKEN"; exit 1; }
11        python3 -m venv .venv
12        .venv/bin/pip install -q build twine
13        .venv/bin/python -m build
14        .venv/bin/twine check dist/*
15        TWINE_USERNAME=__token__ TWINE_PASSWORD="$PYPI_TOKEN" .venv/bin/twine upload --non-interactive dist/*