pymicrocosm/.drone.yml

35 lines
793 B
YAML
Raw Normal View History

kind: pipeline
2022-10-22 14:54:37 +01:00
type: docker
name: test and build
steps:
2022-10-22 14:54:37 +01:00
- name: test
image: python:3.7
commands:
- pip install poetry
- poetry install
2022-10-22 14:54:37 +01:00
- poetry run pytest
- name: publish
when:
branch:
- master
2022-10-22 15:01:06 +01:00
event:
exclude:
- pull_request
2022-10-22 15:27:43 +01:00
image: python:3.7
2022-10-22 14:54:37 +01:00
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
2022-10-22 15:15:14 +01:00
- echo "[distutils]\nindex-servers = gitea\n\n[gitea]\nrepository = ${GITEA_PACKAGE_REPO}\nusername = ${GITEA_OWNER}\npassword = ${GITEA_TOKEN}" > ~/.pypirc
2022-10-22 14:57:59 +01:00
- twine upload -r gitea ./dist/*.whl
2022-10-22 14:54:37 +01:00