- python-package-release.yml: sul tag verifica tag = v + versione del pyproject e che la versione non sia gia' pubblicata, poi ruff/mypy/pytest, build wheel + sdist, twine check e upload su api/packages/PZeta_Touch/pypi - virtualenv isolato e schema di installazione di python-quality-gates (install-extras vuoto -> requirements-dev.txt) - credenziali dai secrets di organizzazione G_USER + NPM_TOKEN, gli stessi del login al registry Gitea - esempio examples/libreria-python/release.yml con python-auto-release in needs Fixes #16 @1h30m
37 lines
1.4 KiB
YAML
37 lines
1.4 KiB
YAML
# Copia in: .gitea/workflows/release.yml
|
|
# Trigger: git tag v* → pubblica il pacchetto sul registry PyPI di Gitea + crea release Gitea
|
|
#
|
|
# Per librerie Python senza Dockerfile (per i servizi vedi examples/python/release.yml).
|
|
# ci.yml e maintenance.yml sono quelli di examples/python.
|
|
#
|
|
# NOTA: auto-release attende package-release via needs.
|
|
# Workaround Gitea bug #31900: token esplicito nel checkout di python-auto-release.yml.
|
|
#
|
|
# Prerequisiti:
|
|
# - pyproject.toml con [project] name e version; il tag deve essere 'v' + version
|
|
# - nome di distribuzione che non collida con un pacchetto di PyPI pubblico
|
|
# - Secrets di organizzazione: G_USER + NPM_TOKEN (token Gitea con scope package)
|
|
#
|
|
# Installazione: pip install --index-url https://gitea.pzetatouch.it/api/packages/PZeta_Touch/pypi/simple/
|
|
# --extra-index-url https://pypi.org/simple <nome>
|
|
|
|
name: Release
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v*'
|
|
|
|
jobs:
|
|
package-release:
|
|
uses: https://gitea.pzetatouch.it/devops/shared-actions/.gitea/workflows/python-package-release.yml@v1
|
|
secrets: inherit
|
|
# with:
|
|
# python-version: '3.11' # opzionale
|
|
# install-extras: 'dev' # opzionale; '' per installare da requirements-dev.txt
|
|
|
|
auto-release:
|
|
needs: [package-release]
|
|
uses: https://gitea.pzetatouch.it/devops/shared-actions/.gitea/workflows/python-auto-release.yml@v1
|
|
secrets: inherit
|