1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35# Publish wheels to PyPI.
name: "Publish to PyPI"
on:
workflow_call:
jobs:
publish:
name: "publish"
runs-on: ubuntu-latest
environment: pypi
permissions:
id-token: write
attestations: write
contents: read
steps:
- name: "Download wheels"
uses: actions/download-artifact@v4
with:
name: wheels
path: dist/
- name: "List wheels"
run: ls -la dist/
- name: "Generate attestations"
uses: actions/attest-build-provenance@v2
with:
subject-path: dist/*
- name: "Publish to PyPI"
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: dist/