From 2c5d096d08327f030cc898f268682f35c08533c8 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Fri, 13 Jan 2023 19:14:06 +0100 Subject: [PATCH] Add continuous integration pipeline --- .woodpecker.yml | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .woodpecker.yml diff --git a/.woodpecker.yml b/.woodpecker.yml new file mode 100644 index 0000000..caa86d4 --- /dev/null +++ b/.woodpecker.yml @@ -0,0 +1,47 @@ +branches: main + +pipeline: + code_lint: + image: python + commands: + - pip install poetry + - poetry install + - pip install black + - echo "----------------- running lint ------------------" + - python --version && poetry --version && black --version + - poetry run black . + + build_dist: + image: python + commands: + - pip install poetry + - poetry install + - echo "----------------- running analysis ------------------" + - python --version && poetry --version + - poetry build + when: + branch: main + + gitea_release: + image: plugins/gitea-release + settings: + api_key: + from_secret: gitea_release_token + base_url: https://git.martyoeh.me + files: dist/* + title: NEWEST_VERSION.md + note: NEWEST_CHANGES.md + when: + event: tag + tag: v* + + pypi_release: + image: python + commands: + - pip install poetry + - poetry install + - echo "----------------- publishing to pypi ------------------" + - poetry publish --username "$PYPI_USERNAME" --password "$PYPI_PASSWORD" + when: + event: tag + tag: v*