2023-01-13 18:14:06 +00:00
|
|
|
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:
|
2023-01-13 19:09:59 +00:00
|
|
|
event: tag
|
|
|
|
tag: v*
|
|
|
|
|
|
|
|
release_prep:
|
|
|
|
image: python
|
|
|
|
commands:
|
|
|
|
- echo "----------------- preparing release ------------------"
|
|
|
|
- python tools/extract-changelog.py
|
|
|
|
when:
|
|
|
|
event: tag
|
|
|
|
tag: v*
|
2023-01-13 18:14:06 +00:00
|
|
|
|
|
|
|
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"
|
2023-01-14 10:53:01 +00:00
|
|
|
secrets: [ pypi_username, pypi_password ]
|
2023-01-13 18:14:06 +00:00
|
|
|
when:
|
|
|
|
event: tag
|
|
|
|
tag: v*
|