From 66d4dff72d8d5f5ce93e35f74948f7c5c88d7b64 Mon Sep 17 00:00:00 2001 From: Kumi Date: Mon, 15 Apr 2024 19:22:07 +0200 Subject: [PATCH] feat(release): streamline PyPI publishing process Simplified the publishing to PyPI steps in the release workflow by consolidating the Python environment setup, tool installation, package building, and publishing into a single job. This change makes the workflow more efficient and reduces the number of steps required to publish a package. It ensures that the environment setup, dependencies installation, package building, and publishing are done in one go, which can help in minimizing potential issues arising from multiple, separate steps. This approach leverages the existing Python and PyPI tools more effectively and could potentially shorten the release cycle time. It also makes the workflow file cleaner and easier to maintain. --- .forgejo/workflows/release.yml | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/.forgejo/workflows/release.yml b/.forgejo/workflows/release.yml index e4794d0..d8d4b02 100644 --- a/.forgejo/workflows/release.yml +++ b/.forgejo/workflows/release.yml @@ -43,21 +43,12 @@ jobs: apt update apt install -y python3 python3-venv - - name: Set up Python environment + - name: Publish to PyPI run: | python3 -m venv venv . ./venv/bin/activate - - - name: Install publishing tools - run: | pip install -U hatchling twine build - - - name: Build the package - run: | python -m build . - - - name: Publish the package to PyPI - run: | python -m twine upload --username __token__ --password ${PYPI_TOKEN} dist/* env: PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}