Verified Commit 63985456 authored by David Runge's avatar David Runge
Browse files

gitlab-ci: Publish to pypi.org on tag

.gitlab-ci.yml:
Add a publish stage, that uses `poetry publish` on a secure runner to
push a release to pypi.org upon tagging. For this we make use of an
access token configured for the project via the environment variable
`POETRY_PYPI_TOKEN_PYPI`.
parent d9fd8b36
Pipeline #10261 passed with stages
in 53 seconds
......@@ -5,6 +5,7 @@ image: archlinux:latest
stages:
- check
- test
- publish
linter:
before_script:
......@@ -26,3 +27,14 @@ system_test:
script:
- pytest -vv tests/ -m "not integration"
stage: test
pypi_publish:
before_script:
- pacman --noconfirm -Syu --needed python-poetry
rules:
- if: '$POETRY_PYPI_TOKEN_PYPI && $CI_COMMIT_TAG'
script:
- poetry publish --build
stage: publish
tags:
- secure
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment