Add Gitea package publishing workflow

This commit is contained in:
José Arturo García
2026-07-22 19:15:36 -04:00
parent a38bdf7593
commit 6ba53c9d7b
2 changed files with 67 additions and 0 deletions
+42
View File
@@ -0,0 +1,42 @@
name: Publish Package
on:
push:
tags:
- "v*"
workflow_dispatch:
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install build tools
run: |
python -m pip install --upgrade pip
python -m pip install build twine
- name: Build package
run: |
python -m build
- name: Check package
run: |
python -m twine check dist/*
- name: Publish to Gitea PyPI registry
env:
TWINE_USERNAME: ${{ secrets.GITEA_PACKAGE_USER }}
TWINE_PASSWORD: ${{ secrets.GITEA_PACKAGE_TOKEN }}
run: |
python -m twine upload \
--repository-url https://gitea.joseagrc.com/api/packages/tryton-do/pypi \
dist/*
+25
View File
@@ -0,0 +1,25 @@
Publishing
==========
Packages are published to the Gitea PyPI-compatible package registry when a
version tag is pushed.
Required repository secrets:
* ``GITEA_PACKAGE_USER``
* ``GITEA_PACKAGE_TOKEN``
Publish a release:
.. code-block:: console
git tag v8.0.0
git push origin v8.0.0
Install from Gitea:
.. code-block:: console
pip install \
--index-url https://gitea.joseagrc.com/api/packages/tryton-do/pypi/simple \
trytond_account_do