Publish to PyPI #5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish to PyPI | |
on: | |
workflow_dispatch: | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
id-token: write # Required for OIDC authentication | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
submodules: true # This ensures that all submodules are also checked out | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' # Adjust your Python version as needed | |
- name: Upgrade pip and install build tools | |
run: | | |
python -m pip install --upgrade pip | |
pip install build twine | |
- name: Build package | |
run: python -m build | |
- name: Publish to PyPI | |
uses: pypa/[email protected] | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_API_TOKEN }} |