image: python:3.8-alpine

stages:
  - upload

upload:
  stage: upload
  variables:
    TWINE_USERNAME: gitlab-ci-token
    TWINE_PASSWORD: $CI_JOB_TOKEN
    PYPI_REPO: $CI_API_V4_URL/projects/$CI_PROJECT_ID/packages/pypi
  script:
    - apk add bash make gcc g++ linux-headers musl-dev libffi-dev
    - make release
  only:
    - master
    - tags
