image: python:3.8-alpine

stages:
  - upload

.upload:
  stage: upload
  variables:
    PYPI_PASSWORD: $PYPI_PASSWORD
  script:
    - apk add bash make gcc g++ linux-headers musl-dev
    - make release
    - echo "Job \"$CI_JOB_STAGE\" was successful!"

upload-develop:
  extends: .upload
  variables:
    PYPI_REPO: https://pypi.perx.ru/root/develop
  only:
    - master

upload-production:
  extends: .upload
  variables:
    PYPI_REPO: https://pypi.perx.ru/root/master
  only:
    - tags
