From a0beef32b37dae97575a36a4e387da0b2640d9c6 Mon Sep 17 00:00:00 2001 From: James Ravenscroft Date: Sat, 22 Oct 2022 14:54:37 +0100 Subject: [PATCH] add drone yaml --- .drone.yml | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/.drone.yml b/.drone.yml index 679ba4e..75f2af9 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,10 +1,30 @@ kind: pipeline -name: test +type: docker +name: test and build steps: - - name: test & build + - name: test image: python:3.7 commands: - pip install poetry - poetry install - - poetry run pytest \ No newline at end of file + - poetry run pytest + + - name: publish + when: + branch: + - master + image: python3.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}" + +