Skip to content

Fix PyPI trusted publishing by adding required pypi environment to publish job - #2

Merged
phraakture merged 2 commits into
mainfrom
copilot/fix-publish-job-failure
Jul 11, 2026
Merged

phraakture merged 2 commits into
mainfrom
copilot/fix-publish-job-failure

Conversation

Copilot AI commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

The publish Actions job failed to exchange its OIDC token with PyPI (invalid-publisher) because the token claims were missing the expected environment. This updates the workflow so token claims align with the trusted publisher configuration.

  • Root cause

    • publish.yml job emitted OIDC claims without environment, while PyPI trusted publishing expects a matching environment-scoped publisher.
  • Workflow change

    • Added environment: pypi to the publish job in .github/workflows/publish.yml.
    • This ensures GitHub includes the environment claim in the OIDC token used by pypa/gh-action-pypi-publish.
  • Resulting behavior

    • Tag-triggered publish runs now present claims compatible with the repository’s PyPI trusted publisher mapping.
jobs:
  publish:
    runs-on: ubuntu-latest
    environment: pypi
    permissions:
      id-token: write

Copilot AI changed the title [WIP] Fix failing GitHub Actions job publish Fix PyPI trusted publishing by adding required pypi environment to publish job Jul 11, 2026
Copilot AI requested a review from phraakture July 11, 2026 20:22
@phraakture
phraakture marked this pull request as ready for review July 11, 2026 20:36
@phraakture
phraakture merged commit e5a79eb into main Jul 11, 2026
5 checks passed
@phraakture
phraakture deleted the copilot/fix-publish-job-failure branch July 11, 2026 20:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants