Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ci): revise pypi publishing #454

Merged
merged 1 commit into from
Nov 3, 2023
Merged

Conversation

JP-Ellis
Copy link
Contributor

@JP-Ellis JP-Ellis commented Nov 3, 2023

📝 Summary

Firstly, this commits adds the building of a source distribution. When a Python package is installed, it is typically installed from a binary wheel and will fallback to the source distribution if it cannot find a matching wheel.

Additionally, I have created a new GitHub environment called pypi which stores a token authorising publication to Pact Python (and only Pact Python). The token is associated with my account, and will hopefully be replaced by trusted publishing soon (which bypasses tokens entirely).

For the time being, I will keep the old GitHub environments in case I need to use the secrets there, but once I have confirmed the new credentials work (or that we don't need credentials at all thanks to trusted publishing), then I will remove the secrets.

🚨 Breaking Changes

🔥 Motivation

The automated publishing to Pypi is unfortunately broken, likely because Pypi now enforces that 2FA be enabled. This consequently prevents a username/password pair from being used for authentication, and requires an authentication token to be generated for the account.

The current build.yml unfortunately makes use of the username/password pair and therefore needs to be fixed

🔨 Test Plan

Wait until the next release and see 🤷‍♂️

🔗 Related issues/PRs

Firstly, this commits adds the building of a source distribution. When a
Python package is installed, it is typically installed from a binary
wheel and will fallback to the source distribution if it cannot find a
matching wheel.

Additionally, I have created a new GitHub environment called `pypi`
which stores a token authorising publication to Pact Python (and only
Pact Python). The token is associated with my account, and will
hopefully be replaced by trusted publishing soon (which bypasses tokens
entirely).

Signed-off-by: JP-Ellis <[email protected]>
@JP-Ellis JP-Ellis added type:fix Fix to an issue area:ci Relating to the CI/CD workflow labels Nov 3, 2023
@JP-Ellis JP-Ellis self-assigned this Nov 3, 2023
@JP-Ellis JP-Ellis requested a review from YOU54F November 3, 2023 05:41
@YOU54F
Copy link
Member

YOU54F commented Nov 3, 2023

Looks good, thanks for running with this and good staged approach

@JP-Ellis JP-Ellis merged commit e942149 into master Nov 3, 2023
33 of 34 checks passed
@JP-Ellis JP-Ellis deleted the chore/pypi-publishing branch November 3, 2023 20:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:ci Relating to the CI/CD workflow type:fix Fix to an issue
Projects
Status: ✅ Completed
Development

Successfully merging this pull request may close these issues.

Automated Pypi Publishing
2 participants