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

Migrate to trusted publisher pypi workflow #228

Merged
merged 2 commits into from
Jan 28, 2024
Merged

Conversation

kyamagu
Copy link
Owner

@kyamagu kyamagu commented Jan 27, 2024

Changes:

@kyamagu kyamagu requested a review from HinTak January 27, 2024 11:07
Copy link
Collaborator

@HinTak HinTak left a comment

Choose a reason for hiding this comment

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

@kyamagu
Copy link
Owner Author

kyamagu commented Jan 27, 2024

@HinTak BTW, please let me know your PyPI account if you have one. I would like to invite you as a collaborator

@HinTak
Copy link
Collaborator

HinTak commented Jan 27, 2024

The build_doc job was missing the same actions update as the publishing job. I hope you don't mind I just adding another commit for that, to get CI going - the addition is obviously enough and you'd have added the exact same change.

@HinTak
Copy link
Collaborator

HinTak commented Jan 28, 2024

@kyamagu I just registered on PyPI using the same username 'HinTak' . 2FA in PyPI looks very complicated there though - github has my phone number and can SMS me, but PyPI's 2FA is something else?

@kyamagu
Copy link
Owner Author

kyamagu commented Jan 28, 2024

@HinTak You can use a TOTP authenticator app like Google Authenticator for 2FA. I set up the TOTP also for Github.

@kyamagu kyamagu merged commit 89907bb into main Jan 28, 2024
14 checks passed
@kyamagu kyamagu deleted the update-pypi-upload branch January 28, 2024 06:35
@kyamagu
Copy link
Owner Author

kyamagu commented Jan 28, 2024

@HinTak, Feel free to debug the new PyPI publishing workflow. Rewriting a release (remove, then create again) is acceptable for debugging the step.

@HinTak
Copy link
Collaborator

HinTak commented Jan 28, 2024

Usually I don't modify/re-use tags once they are public... it is a bit confusing if somebody fetches/sync's and gets them over-written, or worse, if they have a local config blocking such overwrites. It is quite frown upon to re-write git history that way. In the case, the difference is small, and changes over only two days, and irrelevant to end-users. Otherwise I'd give it a new tag like 121.1b6 from 121.0b6. (I still need to remove the old local version of the tag, and you probably need to do the same too - that's why it is considered bad practice...)

@HinTak
Copy link
Collaborator

HinTak commented Jan 28, 2024

@kyamagu I can't open the manage tab on the pypi side - but supposedly only 4 things are needed there, right? Repo, owner, workflow, environment? According to?
https://docs.pypi.org/trusted-publishers/adding-a-publisher/

* `sub`: `repo:kyamagu/skia-python:ref:refs/tags/v121.0b6`
* `repository`: `kyamagu/skia-python`
* `repository_owner`: `kyamagu`
* `repository_owner_id`: `1190780`
* `job_workflow_ref`: `kyamagu/skia-python/.github/workflows/ci.yml@refs/tags/v121.0b6`
* `ref`: `refs/tags/v121.0b6`

@HinTak
Copy link
Collaborator

HinTak commented Jan 28, 2024

@kyamagu what did you put in the github environment (optional) field on the pypi side? That apparently needs to match on github side...

@kyamagu
Copy link
Owner Author

kyamagu commented Jan 28, 2024

@HinTak Right, I'll make a PR for that

@kyamagu
Copy link
Owner Author

kyamagu commented Jan 28, 2024

@HinTak, I've updated your permission on PyPI. Please check

@HinTak
Copy link
Collaborator

HinTak commented Jan 29, 2024

@kyamagu I can see the pypi side now. Hopefully #229 should be it. I'll move the release tag when that ci finishes and try releasing again.

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