[build] Enable attestations for trusted publishing (#11420)

Reverts 428ffb75aa

Authored by: bashonly
This commit is contained in:
bashonly
2024-11-09 23:26:02 +00:00
committed by GitHub
parent be3579aaf0
commit f13df591d4
4 changed files with 50 additions and 6 deletions

View File

@@ -41,3 +41,20 @@ jobs:
actions: write # For cleaning up cache
id-token: write # mandatory for trusted publishing
secrets: inherit
publish_pypi:
needs: [release]
if: vars.NIGHTLY_PYPI_PROJECT != ''
runs-on: ubuntu-latest
permissions:
id-token: write # mandatory for trusted publishing
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: dist
name: build-pypi
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
verbose: true