pymicrocosm/.drone.yml

35 lines
808 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
2022-10-22 16:03:27 +01:00
# when:
# branch:
# - master
# 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:
2022-10-22 15:58:41 +01:00
from_secret: GITEA_PACKAGE_REPO
2022-10-22 14:54:37 +01:00
GITEA_OWNER:
2022-10-22 15:58:41 +01:00
from_secret: GITEA_OWNER
2022-10-22 14:54:37 +01:00
GITEA_TOKEN:
2022-10-22 15:58:41 +01:00
from_secret: GITEA_TOKEN
2022-10-22 14:54:37 +01:00
commands:
- pip install poetry twine
- poetry build
2022-10-22 16:03:27 +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