Skip to content

Add initial tutorial for trusted publishing. #542

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

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

mihaimaruseac
Copy link
Contributor

@mihaimaruseac mihaimaruseac commented Jul 12, 2025

This should fix #253.

mihaimaruseac and others added 2 commits July 12, 2025 12:21
This should solve pyOpenSci#253.

Signed-off-by: Mihai Maruseac <[email protected]>
Signed-off-by: Mihai Maruseac <[email protected]>
@tkoyama010
Copy link
Member

Thanks! Could you please fix the typo reported in this pre-commit CI run?

@mihaimaruseac
Copy link
Contributor Author

Working on it, sorry for the delay

Signed-off-by: Mihai Maruseac <[email protected]>
@tkoyama010
Copy link
Member

No worries at all! Thank you so much for your contribution!

@tkoyama010 tkoyama010 requested a review from Copilot July 12, 2025 19:39
Signed-off-by: Mihai Maruseac <[email protected]>
Copy link
Contributor

@Copilot 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.

Pull Request Overview

This PR introduces a new tutorial on setting up Trusted Publishing for secure, automated package releases via GitHub Actions and updates existing tutorials to reference it.

  • Added trusted-publishing.md with step-by-step guidance on configuring and hardening a GitHub Actions release workflow.
  • Updated publish-pypi.md and intro.md to link to the new Trusted Publishing tutorial.

Reviewed Changes

Copilot reviewed 3 out of 8 changed files in this pull request and generated 3 comments.

File Description
tutorials/trusted-publishing.md New tutorial for setting up and hardening Trusted Publishing
tutorials/publish-pypi.md Added references and tips about Trusted Publishing
tutorials/intro.md Updated TOC to include the new Trusted Publishing tutorial
Comments suppressed due to low confidence (1)

tutorials/publish-pypi.md:65

  • [nitpick] Use the same internal link style as other tutorials (e.g. '') for consistency.
In a [future lesson](trusted-publishing), you will learn how to create an automated GitHub Actions workflow that publishes an updated version of your package to PyPI every time you create a GitHub release.

mihaimaruseac and others added 2 commits July 12, 2025 12:41
Signed-off-by: Mihai Maruseac <[email protected]>

Co-authored-by: Copilot <[email protected]>
Signed-off-by: Mihai Maruseac <[email protected]>

Co-authored-by: Copilot <[email protected]>
@mihaimaruseac
Copy link
Contributor Author

Hmm, this is failing for the links I added to the currently added page. Should I separate the links to another PR?

@tkoyama010
Copy link
Member

Yes, that makes it easy to understand. Thanks so much for your help!

@mihaimaruseac
Copy link
Contributor Author

I think now this is a failure of the checker. It's the same as #529 (comment) (another PR that added a new file)

Copy link
Member

@flpm flpm left a comment

Choose a reason for hiding this comment

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

@mihaimaruseac thanks for the PR!

We should add the new section to the table of contents in the tutorials section /tutorials/intro.md so it appears in the side bar. You can add something like Trusted publishing with GitHub Actions <trusted-publishing> after line 47.

Also, I got a warning when building because an issue with double quotes on the img tag, I made a code suggestion to fix.

About the links, I believe they don't exist because you are adding them and so they have not been published to the site yet.

@mihaimaruseac
Copy link
Contributor Author

I'll revert cb089f7 to add back the links then.

I'll also change the quotes.

Thank you for the review

@flpm
Copy link
Member

flpm commented Jul 13, 2025

Oh, I did not realize @tkoyama010 was already reviewing and had asked you to split in a different PR, I am sorry for causing confusion, I defer to his decisions here.

@mihaimaruseac
Copy link
Contributor Author

I can revert the revert again, @tkoyama010 up to you.

But I think the failure is the same on both cases, the links are newly created but the CI expects them to be there. Same failure as in #529, as mentioned above.

@flpm
Copy link
Member

flpm commented Jul 14, 2025

I agree, it's mostly to choose the most proper way to handle but it's not a problem. Thanks for fixing the quotes!

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.

Add: page on trusted workflows (or create a tutorial section in the publishing to pypi section on trusted workflows) make sure
3 participants