pretalx-musicrate/.drone.yml

58 lines
1.1 KiB
YAML

---
kind: pipeline
type: docker
name: default
steps:
- name: create virtual env
image: python:3.11-alpine
commands:
- python -m venv .venv
- name: install
image: python:3.11-alpine
commands:
- &path
export PATH="$$DRONE_WORKSPACE/.venv/bin:$$PATH"
- echo $$PATH
- which pip
- pip install black build Django flake8 isort twine
- name: check style
image: python:3.11-alpine
commands:
- *path
- black --check .
- isort -c .
- flake8 .
- name: build
image: python:3.11-alpine
commands:
- *path
- apk --update-cache add gettext
- cd pretalx_musicrate
- django-admin compilemessages
- cd ..
- python -m build
- name: publish
image: python:3.11-alpine
commands:
- *path
- keyring --disable
- twine upload --non-interactive --repository-url https://git.luj0ga.de/api/packages/kontakt/pypi -u '' dist/*
environment:
TWINE_PASSWORD:
from_secret: repo_token
when:
event:
- tag
trigger:
event:
- pr
- push
- tag