File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# Publishes the package to PyPI when a GitHub Release is *published*
2- # (not on draft creation — only when you click "Publish release").
3- #
4- # Authentication: uses PyPI Trusted Publisher (OIDC) — no long-lived secrets
5- # needed. Configure a Trusted Publisher for this repo on pypi.org first:
6- # https://docs.pypi.org/trusted-publishers/adding-a-publisher/
7- #
8- # If you prefer an API token instead, remove the `environment` + `permissions`
9- # blocks and uncomment:
10- # password: ${{ secrets.PYPI_API_TOKEN }}
11- # in the "Publish" step below.
122
133name : Python Client - Publish to PyPI
144
155on :
166 release :
177 types : [published]
188
19- # Restrict the default GITHUB_TOKEN to read-only.
20- # The publish job adds id-token: write for OIDC Trusted Publisher.
219permissions :
2210 contents : read
2311
2412jobs :
2513 test :
2614 name : " Test before publish"
2715 runs-on : ubuntu-latest
28- # inherits workflow-level permissions: contents: read
2916
3017 steps :
3118 - uses : actions/checkout@v4
4835
4936 environment : pypi
5037 permissions :
51- id-token : write # required for OIDC Trusted Publisher
38+ id-token : write
5239
5340 steps :
5441 - uses : actions/checkout@v4
6956
7057 - name : Publish to PyPI
7158 uses : pypa/gh-action-pypi-publish@release/v1
72- # Uncomment the next line to use an API token instead of Trusted Publisher:
73- # with:
74- # password: ${{ secrets.PYPI_API_TOKEN }}
Original file line number Diff line number Diff line change 1- # Runs on every push / pull-request against master.
2- # Matrix: Python 3.11 – 3.14 | type-check (mypy) + tests (pytest) + coverage
3-
41name : Python Client - CI
52
63on :
96 pull_request :
107 branches : [master]
118
12- # Restrict the default GITHUB_TOKEN to read-only.
13- # Individual jobs add back only the permissions they need.
149permissions :
1510 contents : read
1611
Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ markers = [
7070
7171[tool .black ]
7272line-length = 120
73- target-version = [" py310 " ]
73+ target-version = [" py311 " ]
7474
7575[tool .isort ]
7676profile = " black"
You can’t perform that action at this time.
0 commit comments