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

Use PyPi token for authentication on CI deploy job #55

Merged
merged 5 commits into from
Jun 28, 2024
Merged

Conversation

sandcha
Copy link
Contributor

@sandcha sandcha commented Apr 29, 2024

Context: 2FA Requirement for PyPI begins 2024-01-01

  • Technical improvement.
  • Details:
    • Use PyPi token for authentication on CI deploy job
    • Allows for Python package upload since the 2FA enforcement on PyPi

This PR comes with:

  • on PyPi: a PyPi token linked to this repository added to a PyPi account having access to the OpenFisca Extension-Template project (the token is on the openfisca-bot account; we can find it on the settings page)
  • on GitHub: a PYPI_TOKEN_OPENFISCA_BOT in this repository secrets

These changes :

  • Change non-functional parts of this repository (for instance editing the README)

Copy link
Member

@MattiSG MattiSG left a comment

Choose a reason for hiding this comment

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

Let's already check that everything works well in openfisca/country-template#144 before backporting here 🙂

@sandcha
Copy link
Contributor Author

sandcha commented Jun 21, 2024

Regarding 49f5c97 @MattiSG, I think that it's better to revert the commit.
I don't understand what happened to the PYPI_TOKEN_OPENFISCA_BOT in this GitHub repository secrets settings (if we revert the commit, we need to set it back in the settings) but I think that we need to keep the user account name in the token name (like OPENFISCA_BOT here) to avoid the issue that we had at the beginng of this year (finding the PyPi user that added a PyPi token and the kind of configuration that was made on the PyPi user account interface).

@sandcha
Copy link
Contributor Author

sandcha commented Jun 28, 2024

The PR is ready again for a review @MattiSG @benoit-cty.
Regarding configuration, there is a new token:

  • on the PyPi openfisca-bot account (I removed the previous one from PyPi)
  • and in this repository settings (PYPI_TOKEN_OPENFISCA_BOT ; I also removed a PYPI_TOKEN from this repository secrets).

And I didn't revert the 49f5c97 commit in order to keep its syntax.

@sandcha
Copy link
Contributor Author

sandcha commented Jun 28, 2024

Thank you @benoit-cty! Reordering commits and merging...

@sandcha sandcha enabled auto-merge June 28, 2024 16:18
@sandcha sandcha merged commit 0fa3ab6 into master Jun 28, 2024
6 checks passed
@sandcha sandcha deleted the use-pypi-2fa branch June 28, 2024 16:18
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