2023-12-14 00:43:58 +01:00
|
|
|
---
|
|
|
|
|
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
name: default
|
|
|
|
|
|
|
|
steps:
|
2023-12-16 03:57:42 +01:00
|
|
|
- name: create virtual env
|
|
|
|
image: python:3.11-alpine
|
|
|
|
commands:
|
|
|
|
- python -m venv .venv
|
2023-12-14 01:37:52 +01:00
|
|
|
|
2023-12-16 03:57:42 +01:00
|
|
|
- name: install
|
|
|
|
image: python:3.11-alpine
|
|
|
|
commands:
|
|
|
|
- &path
|
|
|
|
export PATH="$$DRONE_WORKSPACE/.venv/bin:$$PATH"
|
|
|
|
- echo $$PATH
|
|
|
|
- which pip
|
|
|
|
- pip install black build flake8 isort twine
|
2023-12-14 01:17:50 +01:00
|
|
|
|
2023-12-16 03:57:42 +01:00
|
|
|
- name: check style
|
|
|
|
image: python:3.11-alpine
|
|
|
|
commands:
|
|
|
|
- *path
|
|
|
|
- black --check .
|
|
|
|
- isort -c .
|
|
|
|
- flake8 .
|
2023-12-14 00:56:09 +01:00
|
|
|
|
2023-12-16 03:57:42 +01:00
|
|
|
- name: build
|
|
|
|
image: python:3.11-alpine
|
|
|
|
commands:
|
|
|
|
- *path
|
|
|
|
- python -m build
|
2023-12-14 00:43:58 +01:00
|
|
|
|
2023-12-14 02:33:46 +01:00
|
|
|
- name: publish
|
2023-12-14 01:03:35 +01:00
|
|
|
image: python:3.11-alpine
|
2023-12-14 00:43:58 +01:00
|
|
|
commands:
|
2023-12-16 03:57:42 +01:00
|
|
|
- *path
|
|
|
|
- keyring --disable
|
|
|
|
- twine upload --non-interactive --repository-url https://git.luj0ga.de/api/packages/kontakt/pypi -u '' dist/*
|
2023-12-14 00:43:58 +01:00
|
|
|
environment:
|
2023-12-16 03:57:42 +01:00
|
|
|
TWINE_PASSWORD:
|
|
|
|
from_secret: repo_token
|
|
|
|
when:
|
|
|
|
event:
|
|
|
|
- tag
|
2023-12-14 00:56:09 +01:00
|
|
|
|
|
|
|
trigger:
|
|
|
|
event:
|
|
|
|
- pr
|
|
|
|
- push
|
|
|
|
- tag
|