diff --git a/.gitea/workflows/publish.yml b/.gitea/workflows/publish.yml index 82984bb..dc3ae3e 100644 --- a/.gitea/workflows/publish.yml +++ b/.gitea/workflows/publish.yml @@ -41,7 +41,6 @@ jobs: publish: runs-on: ubuntu-latest needs: build - if: ${{ startsWith(github.ref, 'refs/heads/8.0.') }} steps: - name: Checkout @@ -71,5 +70,6 @@ jobs: TWINE_PASSWORD: ${{ secrets.GITEA_PACKAGE_TOKEN }} run: | python -m twine upload \ + --skip-existing \ --repository-url https://gitea.joseagrc.com/api/packages/tryton-do/pypi \ dist/* diff --git a/doc/publishing.rst b/doc/publishing.rst index 988fc49..b647183 100644 --- a/doc/publishing.rst +++ b/doc/publishing.rst @@ -1,17 +1,19 @@ Publishing ========== -Every pushed commit builds and validates the package. +Every pushed commit builds, validates, and publishes the package to the Gitea +PyPI-compatible package registry. -Packages are published to the Gitea PyPI-compatible package registry when the -push is made to a version branch named like ``8.0.0``, ``8.0.1``, etc. +The publishing workflow uses ``twine upload --skip-existing`` so repeated +commits with the same package version do not fail. To publish a new package +artifact, update the module version in ``tryton.cfg`` before pushing. Required repository secrets: * ``GITEA_PACKAGE_USER`` * ``GITEA_PACKAGE_TOKEN`` -Publish a release: +Publish a release branch: .. code-block:: console