Skip to content

Commit d794358

Browse files
committed
ci: Use default python GitHub publishing action
1 parent 5fbec78 commit d794358

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

.github/workflows/dist.yaml

+11-3
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,14 @@ on:
99
- "v[0-9]+.[0-9]+.[0-9]+"
1010

1111
jobs:
12-
# Package and distribute to PyPI
1312
dist:
13+
name: Upload release to PyPI
1414
runs-on: ubuntu-latest
15+
environment:
16+
name: pypi
17+
url: https://pypi.org/p/<your-pypi-project-name>
18+
permissions:
19+
id-token: write # This permission is mandatory for trusted publishing
1520
steps:
1621
- uses: actions/checkout@v4
1722
- uses: actions/setup-python@v5
@@ -23,5 +28,8 @@ jobs:
2328
with:
2429
gha-cache-key: v0-py3.12
2530
named-caches-hash: ${{ hashFiles('3rdparty/python/default.lock') }}
26-
- run: |
27-
pants publish //:dist
31+
- name: Build package
32+
run: |
33+
pants package //:dist
34+
- name: Publish package distributions to PyPI
35+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)