PyPI upload #7
Workflow file for this run
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
# This workflows will upload a Python Package when a release is created. | |
# For more information see: | |
# - https://docs.pypi.org/trusted-publishers/adding-a-publisher/ | |
# - https://github.com/pypa/gh-action-pypi-publish | |
name: PyPI upload | |
on: | |
release: | |
types: [created] | |
workflow_dispatch: | |
jobs: | |
publish_pypi: | |
name: Publish package to PyPI | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
- name: Build package | |
run: | | |
set -vxeuo pipefail | |
python -m pip install --upgrade pip | |
pip install build | |
python -m build | |
- name: Publish wheels to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
packages-dir: ./dist/ |