Skip to content

Commit 3a99cac

Browse files
Merge pull request #567 from databrickslabs/oidc
Unify release to PyPI via GitHub OIDC
2 parents 58b4dec + 9a37b69 commit 3a99cac

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

.github/workflows/pypi-release.yml renamed to .github/workflows/release.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
1-
name: publish python package to test-pypi
1+
name: publish python package to pypi
22
on:
33
release:
44
types: [published]
55

66
jobs:
77
build-n-publish:
8-
name: Build project and publish to TestPyPI
9-
runs-on: ubuntu-22.04
8+
name: Build project and publish to PyPI
9+
runs-on: ubuntu-latest
10+
environment: release
11+
permissions:
12+
# Used to authenticate to PyPI via OIDC and sign the release's artifacts with sigstore-python.
13+
id-token: write
14+
# Used to attach signing artifacts to the published release.
15+
contents: write
1016
strategy:
1117
matrix:
1218
python: [ 3.10.12 ]
@@ -24,6 +30,4 @@ jobs:
2430
- name: Publish a Python distribution to PyPI
2531
uses: pypa/gh-action-pypi-publish@release/v1
2632
with:
27-
user: __token__
28-
password: ${{ secrets.LABS_PYPI_TOKEN }}
2933
packages_dir: python/dist/

0 commit comments

Comments
 (0)