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.
This commit is contained in:
parent
9110910b11
commit
66d4dff72d
1 changed files with 1 additions and 10 deletions
|
@ -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 }}
|
||||
|
|
Loading…
Reference in a new issue