---
kind: pipeline
name: develop

trigger:
  event:
    - push
  branch:
    - master

steps:
  - name: Upload to pypi
    image: python:3.8-alpine
    environment:
      PYPI_REPO: https://pypi.perx.ru/
      PYPI_PASSWORD:
        from_secret: pypi_password
    commands:
      - apk add bash make gcc g++ linux-headers musl-dev
      - make release
---
kind: pipeline
name: production

trigger:
  event:
    - tag
  refs:
    - refs/tags/v*

steps:
  - name: Upload to pypi
    image: python:3.8-alpine
    environment:
      PYPI_REPO: https://pypi.perx.ru/
      PYPI_PASSWORD:
        from_secret: pypi_password_prod
    commands:
      - apk add bash make gcc g++ linux-headers musl-dev
      - make release