Skip to content
Merged
Show file tree
Hide file tree
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
35 changes: 35 additions & 0 deletions .github/workflows/publish-pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Publish Python Package to PyPI

on:
release:
types: [published]

permissions:
contents: read

jobs:
build-release:
uses: ./.github/workflows/build.yml

pypi-publish:
runs-on: ubuntu-latest
needs:
- build-release
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write

environment:
name: pypi

steps:
- name: Retrieve release distributions
uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/

- name: Publish release distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: dist/
4 changes: 2 additions & 2 deletions .github/workflows/test-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Test Python Package Build

on:
push:
branches: [ main, dev ]
branches: [ main ]
pull_request:
branches: [ main, dev ]
branches: [ main ]
workflow_dispatch: # Manual test button

permissions:
Expand Down
Loading