Last active
January 9, 2021 10:40
-
-
Save mrrizal/675f7e1d3f4b70067a266ae02aca8f3a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
image: python:3.8.5 | |
variables: | |
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip" | |
cache: | |
paths: | |
- .cache/pip | |
- venv/ | |
before_script: | |
- python -V | |
- pip install virtualenv | |
- virtualenv venv | |
- source venv/bin/activate | |
- pip install -r requirements.txt | |
test: | |
script: | |
- make test | |
build: | |
only: | |
refs: | |
- tags | |
script: | |
- pip install twine | |
- make build | |
- TWINE_PASSWORD=${CI_JOB_TOKEN} TWINE_USERNAME=gitlab-ci-token python -m twine upload --repository-url https://gitlab.com/api/v4/projects/${CI_PROJECT_ID}/packages/pypi dist/* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment