mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-22 13:15:12 +00:00
ci: release with trusted publisher and attestations (#5196)
* ci: release with trusted publisher and attestations Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com> * Update pip.yml --------- Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
This commit is contained in:
parent
26281c7986
commit
b5ec7c7174
18
.github/workflows/pip.yml
vendored
18
.github/workflows/pip.yml
vendored
@ -58,7 +58,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Prepare env
|
- name: Prepare env
|
||||||
run: |
|
run: |
|
||||||
python -m pip install -r tests/requirements.txt build twine
|
python -m pip install -r tests/requirements.txt build twine!=5.1.0
|
||||||
|
|
||||||
- name: Python Packaging tests
|
- name: Python Packaging tests
|
||||||
run: pytest tests/extra_python_package/
|
run: pytest tests/extra_python_package/
|
||||||
@ -91,23 +91,27 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: github.event_name == 'release' && github.event.action == 'published'
|
if: github.event_name == 'release' && github.event.action == 'published'
|
||||||
needs: [packaging]
|
needs: [packaging]
|
||||||
|
environment: pypi
|
||||||
|
permissions:
|
||||||
|
id-token: write
|
||||||
|
attestations: write
|
||||||
|
contents: read
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/setup-python@v5
|
|
||||||
with:
|
|
||||||
python-version: "3.x"
|
|
||||||
|
|
||||||
# Downloads all to directories matching the artifact names
|
# Downloads all to directories matching the artifact names
|
||||||
- uses: actions/download-artifact@v4
|
- uses: actions/download-artifact@v4
|
||||||
|
|
||||||
|
- name: Generate artifact attestation for sdist and wheel
|
||||||
|
uses: actions/attest-build-provenance@173725a1209d09b31f9d30a3890cf2757ebbff0d # v1.1.2
|
||||||
|
with:
|
||||||
|
subject-path: "*/pybind11*"
|
||||||
|
|
||||||
- name: Publish standard package
|
- name: Publish standard package
|
||||||
uses: pypa/gh-action-pypi-publish@release/v1
|
uses: pypa/gh-action-pypi-publish@release/v1
|
||||||
with:
|
with:
|
||||||
password: ${{ secrets.pypi_password }}
|
|
||||||
packages-dir: standard/
|
packages-dir: standard/
|
||||||
|
|
||||||
- name: Publish global package
|
- name: Publish global package
|
||||||
uses: pypa/gh-action-pypi-publish@release/v1
|
uses: pypa/gh-action-pypi-publish@release/v1
|
||||||
with:
|
with:
|
||||||
password: ${{ secrets.pypi_password_global }}
|
|
||||||
packages-dir: global/
|
packages-dir: global/
|
||||||
|
Loading…
Reference in New Issue
Block a user