Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 36 additions & 15 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,46 @@ on:
types: [published]

jobs:
pypi-publish:
name: upload release to PyPI
build:
name: build
runs-on: ubuntu-latest
environment: pypi
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- name: Clone repo
uses: actions/[email protected]

- name: Set up Python
uses: actions/setup-python@v5
- name: Set up python
uses: actions/setup-python@v5.5.0
with:
python-version: '3.9'
python-version: '3.13'

- name: Install pip dependencies
run: pip install build

- name: Install build tool
run: python -m pip install --upgrade build
- name: List pip dependencies
run: pip list

- name: Build project
run: python3 -m build

- name: Upload artifacts
uses: actions/[email protected]
with:
name: pypi-dist
path: dist/

- name: Build package
run: python -m build
pypi:
name: pypi
needs:
- build
permissions:
id-token: write
runs-on: ubuntu-latest
steps:
- name: Download artifacts
uses: actions/[email protected]
with:
name: pypi-dist
path: dist/

- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@v1.12.4
Loading