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
name: Upload Python Package to PyPi | |
on: | |
release: | |
types: [published] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
# artifact name and pypi version are determined by the pyproject.toml | |
- name: Build | |
run: | | |
pip install poetry | |
poetry build | |
- name: Upload dists | |
uses: actions/upload-artifact@v3 | |
with: | |
path: dist/ | |
publish: | |
needs: | |
- build | |
runs-on: ubuntu-latest | |
environment: release | |
permissions: | |
id-token: write | |
steps: | |
- uses: actions/download-artifact@v3 | |
- name: Publish package distributions to PyPI | |
uses: pypa/[email protected] | |
with: | |
packages_dir: artifact/ |