kind: pipeline type: docker name: test and build steps: # - name: test # image: python:3.7 # commands: # - pip install poetry # - poetry install # - poetry run pytest - name: publish when: branch: - master event: exclude: - pull_request image: python:3.7 environment: GITEA_PACKAGE_REPO: from_secret: GITEA_PACKAGE_REPO GITEA_OWNER: from_secret: GITEA_OWNER GITEA_TOKEN: from_secret: GITEA_TOKEN commands: - pip install poetry twine - poetry build - echo "[distutils]\nindex-servers = gitea\n\n[gitea]\nrepository = $${GITEA_PACKAGE_REPO}\nusername = $${GITEA_OWNER}\npassword = $${GITEA_TOKEN}" > ~/.pypirc - twine upload -r gitea ./dist/*.whl