2023-06-27 09:19:28 +00:00
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
name: pdf-auralia-build-and-publish
|
|
|
|
type: docker
|
|
|
|
|
|
|
|
# Spécifie l'image Docker à utiliser
|
|
|
|
image: python:3.11
|
|
|
|
|
|
|
|
# Étapes de la pipeline
|
|
|
|
steps:
|
|
|
|
- name: build-and-publish
|
|
|
|
image: python:3.11
|
|
|
|
commands:
|
2023-06-27 09:59:40 +00:00
|
|
|
- echo ${DRONE_TAG}
|
2023-06-30 11:51:04 +00:00
|
|
|
- sed -i 's/version = "[^"]*"/version = "${DRONE_TAG}"/g' pyproject.toml
|
2023-06-27 09:19:28 +00:00
|
|
|
- curl -sSL https://install.python-poetry.org | python3 -
|
|
|
|
- export PATH="/root/.local/bin:$PATH"
|
|
|
|
- poetry --version
|
|
|
|
- poetry build
|
2023-06-27 09:31:28 +00:00
|
|
|
- poetry publish --username __token__ --password $PYPI_TOKEN
|
2023-06-27 09:19:28 +00:00
|
|
|
environment:
|
2023-06-27 09:31:28 +00:00
|
|
|
PYPI_TOKEN:
|
|
|
|
from_secret: pypi_token
|
2023-06-27 09:19:28 +00:00
|
|
|
|
2023-07-08 07:06:25 +00:00
|
|
|
- name: Notify on matrix
|
|
|
|
image: plugins/matrix
|
2023-07-08 07:08:09 +00:00
|
|
|
environment:
|
|
|
|
MATRIX_ROOMID:
|
|
|
|
from_secret: MATRIX_ROOMID
|
2023-09-20 07:37:50 +00:00
|
|
|
MATRIX_ACCESSTOKEN:
|
2023-07-08 07:08:09 +00:00
|
|
|
from_secret: MATRIX_ACCESSTOKEN
|
|
|
|
MATRIX_USERID:
|
|
|
|
from_secret: MATRIX_USERID
|
2023-07-08 07:06:25 +00:00
|
|
|
settings:
|
|
|
|
homeserver: https://matrix.poneyworld.net
|
|
|
|
template: "Une nouvelle version (${DRONE_TAG}) de pdf-oralia est publiée!"
|
|
|
|
|
2023-06-27 09:19:28 +00:00
|
|
|
# Déclencheur de la pipeline
|
|
|
|
trigger:
|
|
|
|
event:
|
|
|
|
include:
|
|
|
|
- tag
|