Make package workflow independent of external actions
Publicar paquete PyPI / publish (push) Failing after 13s
Publicar paquete PyPI / publish (push) Failing after 13s
This commit is contained in:
@@ -14,20 +14,21 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: https://gitea.com/actions/checkout@v4
|
||||
with:
|
||||
token: ${{ secrets.GITEA_TOKEN }}
|
||||
github-server-url: http://unpaismejor-gitea-app:3000
|
||||
ref: 8.0
|
||||
fetch-depth: 0
|
||||
env:
|
||||
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||
run: |
|
||||
test -n "$GITEA_TOKEN" || { echo "Missing GITEA_TOKEN secret"; exit 1; }
|
||||
git init .
|
||||
git remote add origin http://unpaismejor-gitea-app:3000/tryton-do/ncf_manager.git
|
||||
git -c http.extraHeader="Authorization: token $GITEA_TOKEN" \
|
||||
fetch --depth=1 origin 8.0
|
||||
git checkout --detach FETCH_HEAD
|
||||
|
||||
- name: Configurar Python
|
||||
uses: https://gitea.com/actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.11"
|
||||
- name: Verificar Python
|
||||
run: python3 --version
|
||||
|
||||
- name: Instalar herramientas
|
||||
run: python -m pip install --upgrade "build>=1,<2" "twine>=6,<7"
|
||||
run: python3 -m pip install --upgrade "build>=1,<2" "twine>=6,<7"
|
||||
|
||||
- name: Comprobar credenciales
|
||||
env:
|
||||
@@ -38,7 +39,7 @@ jobs:
|
||||
env:
|
||||
PACKAGE_VERSION: 8.0.${{ gitea.run_number }}
|
||||
run: |
|
||||
python - <<'PY'
|
||||
python3 - <<'PY'
|
||||
from pathlib import Path
|
||||
import os, re
|
||||
path = Path('tryton.cfg')
|
||||
@@ -49,14 +50,14 @@ jobs:
|
||||
|
||||
- name: Construir y validar
|
||||
run: |
|
||||
python -m build
|
||||
python -m twine check dist/*
|
||||
python3 -m build
|
||||
python3 -m twine check dist/*
|
||||
|
||||
- name: Publicar en Gitea PyPI
|
||||
env:
|
||||
TWINE_USERNAME: unpaismejor
|
||||
TWINE_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }}
|
||||
run: |
|
||||
python -m twine upload --non-interactive \
|
||||
python3 -m twine upload --non-interactive \
|
||||
--repository-url https://code.unpaismejor.org.do/api/packages/tryton-do/pypi \
|
||||
dist/*
|
||||
|
||||
Reference in New Issue
Block a user