Skip to content

Instantly share code, notes, and snippets.

@mrrizal
Last active January 9, 2021 10:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mrrizal/675f7e1d3f4b70067a266ae02aca8f3a to your computer and use it in GitHub Desktop.
Save mrrizal/675f7e1d3f4b70067a266ae02aca8f3a to your computer and use it in GitHub Desktop.
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