Add Gitea package publishing workflow
This commit is contained in:
@@ -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/*
|
||||||
@@ -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
|
||||||
Reference in New Issue
Block a user