Added CI pipeline for testing and publishing
Introduced a GitLab CI configuration to automate the testing and publishing of the package. The pipeline runs tests and, on tagged commits, publishes the package to PyPI using stored credentials, ensuring a streamlined release process.
This commit is contained in:
parent
e3dcc2cd4b
commit
2adcd09322
1 changed files with 21 additions and 0 deletions
21
.gitlab-ci.yml
Normal file
21
.gitlab-ci.yml
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
image: python:3.10
|
||||||
|
|
||||||
|
stages:
|
||||||
|
- test
|
||||||
|
- publish
|
||||||
|
|
||||||
|
before_script:
|
||||||
|
- python -V
|
||||||
|
- python -m venv venv
|
||||||
|
- source venv/bin/activate
|
||||||
|
- pip install -U pip
|
||||||
|
- pip install .
|
||||||
|
|
||||||
|
publish:
|
||||||
|
stage: publish
|
||||||
|
script:
|
||||||
|
- pip install -U hatchling twine build
|
||||||
|
- python -m build .
|
||||||
|
- python -m twine upload --username __token__ --password ${PYPI_TOKEN} dist/*
|
||||||
|
only:
|
||||||
|
- tags
|
Loading…
Reference in a new issue