Skip to content

Update pypi release #1131

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 18, 2025
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/checkout@v4.2.2

- 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/upload-artifact@v4.6.2
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/download-artifact@v4.2.1
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