Skip to content

Commit af6c30e

Browse files
committed
use OIDC for publishing
Signed-off-by: Martin Schurz <[email protected]>
1 parent 362fa59 commit af6c30e

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

.github/workflows/pypi.yml

+10-6
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,19 @@ on:
1010
jobs:
1111
deploy:
1212
runs-on: ubuntu-latest
13+
# Specifying a GitHub environment is optional, but strongly encouraged
14+
environment: release
15+
permissions:
16+
# IMPORTANT: this permission is mandatory for trusted publishing
17+
id-token: write
1318
steps:
1419
- uses: actions/checkout@v3
1520

1621
- name: Install poetry
1722
run: pip install poetry
1823

19-
- name: Publish to pypi
20-
env:
21-
POETRY_HTTP_BASIC_PYPI_USERNAME: __token__
22-
POETRY_HTTP_BASIC_PYPI_PASSWORD: ${{ secrets.PYPI_TOKEN }}
23-
PYTHON_KEYRING_BACKEND: keyring.backends.null.Keyring
24-
run: poetry publish --build
24+
- name: Build dist
25+
run: poetry build
26+
27+
- name: Publish package distributions to PyPI
28+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)