pymicrocosm/.drone.yml

35 lines
796 B
YAML
Raw Permalink Normal View History

kind: pipeline
2022-10-22 14:54:37 +01:00
type: docker
name: test and build
steps:
2022-10-30 15:56:41 +00:00
- name: test
image: python:3.7
commands:
- pip install poetry
- poetry install
- poetry run pytest
2022-10-22 14:54:37 +01:00
- 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:
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-30 15:55:07 +00: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