Skip to content

Commit

Permalink
chore: publish with attestation (#36)
Browse files Browse the repository at this point in the history
Based on [attestation warnings in the release
pipeline](https://github.com/equinix/equinix-sdk-python/actions/runs/12290045589),
this PR removes the username and password combo, as advised in the GHA
warnings and here:
https://github.com/pypa/gh-action-pypi-publish?tab=readme-ov-file#trusted-publishing

I've added the Trusted Publisher Management publisher profile for GitHub
to the Pypi project.
https://pypi.org/manage/project/equinix/settings/publishing/

I'm leaving the token credential in GHA Secrets, for now, so that we can
revert this PR and take the alternate approach of disabling attestation
if there are additional hurdles in the publishing phase.
  • Loading branch information
thogarty authored Dec 14, 2024
2 parents bebbc83 + 8f73662 commit 6bfd52a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ jobs:
release:
name: Build and publish package
runs-on: ubuntu-latest
permissions:
id-token: write

steps:
- name: Checkout
Expand Down Expand Up @@ -51,6 +53,4 @@ jobs:
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
packages-dir: ${{ env.DIST_DIR }}

0 comments on commit 6bfd52a

Please sign in to comment.