Skip to content

publish-pypi

publish-pypi #9

Workflow file for this run

name: publish-pypi
on:
release:
types: [published]
# workflow_dispatch: # We may want to add manual publishing as well.
jobs:
publish:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
env:
TWINE_USERNAME: ${{ secrets.TEST_PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_PASSWORD }}
TAG: ${{ github.ref_name }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Update Quorum version
run: echo "__version__ = '$TAG'" > Quorum/__init__.py
- name: Install requirements for publishing
run: pip3 install build twine
- name: Build distros
run: python3 -m build
- name: Upload to PyPi
run: python3 -m twine upload --repository testpypi dist/* --verbose