Skip to content

[WIP] Fix GitHub Actions workflows for PyPI and TestPyPI#1

Merged
NerdyGamers merged 1 commit intomainfrom
copilot/fix-pypi-publish-workflows
Dec 18, 2025
Merged

[WIP] Fix GitHub Actions workflows for PyPI and TestPyPI#1
NerdyGamers merged 1 commit intomainfrom
copilot/fix-pypi-publish-workflows

Conversation

Copy link
Contributor

Copilot AI commented Dec 18, 2025

Thanks for asking me to work on this. I will get started on it and keep this PR's description up to date as I form a plan and make progress.

Original prompt

Problem

The current GitHub Actions workflows for publishing to PyPI and TestPyPI have incorrect configuration that will prevent them from working properly.

Tasks

  1. Fix .github/workflows/release-publish.yml:

    • Change env: section to use password: in the with: section instead
    • Add id-token: write permission for trusted publishing support
    • Update action version to release/v1 for better stability
    • Ensure packages-dir has trailing slash: dist/
  2. Fix .github/workflows/testpypi-publish.yml:

    • Change env: section to use password: in the with: section instead
    • Add id-token: write permission for trusted publishing support
    • Update action version to release/v1 for better stability
    • Remove unnecessary twine installation (not needed with gh-action-pypi-publish)
    • Ensure packages-dir has trailing slash: dist/

Expected Result

Both workflows should properly authenticate with PyPI using the secrets:

  • PYPI_API_TOKEN for production releases
  • TEST_PYPI_API_TOKEN for test releases

The corrected workflows will:

  • Pass the API token via the password parameter in the with: section (not via env)
  • Support both API token authentication and trusted publishing
  • Use the stable release version of the publish action
  • Follow PyPI publishing best practices

Reference

The pypa/gh-action-pypi-publish action requires authentication via the password parameter in the with: section, not as an environment variable.

This pull request was created from Copilot chat.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@NerdyGamers NerdyGamers marked this pull request as ready for review December 18, 2025 01:17
Copilot AI review requested due to automatic review settings December 18, 2025 01:17
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.

@NerdyGamers NerdyGamers merged commit 0fec5db into main Dec 18, 2025
@NerdyGamers NerdyGamers deleted the copilot/fix-pypi-publish-workflows branch December 18, 2025 01:23
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.

3 participants