Skip to content
New issue

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

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

Already on GitHub? # to your account

[maintenance] Migrate PyPI release automation to Trusted Publishing #10256

Closed
webknjaz opened this issue Mar 3, 2025 · 3 comments · Fixed by #10263
Closed

[maintenance] Migrate PyPI release automation to Trusted Publishing #10256

webknjaz opened this issue Mar 3, 2025 · 3 comments · Fixed by #10263
Labels
Maintenance Discussion or action around maintaining pylint or the dev workflow Needs PR This issue is accepted, sufficiently specified and now needs an implementation
Milestone

Comments

@webknjaz
Copy link
Contributor

webknjaz commented Mar 3, 2025

This will make it possible to stop keeping the long-living PyPI API token in the repository settings. Additionally, it'll allow PyPI to display more metadata as verified.
And finally, this allows publishing PEP 740 digital attestations as a part of the release (enabled by default in pypi-publish).

Configuration will require somebody with Owner privileges on PyPI to set up trust. And somebody capable of updating the Environments section of the GitHub repository settings (for setting up release flow protection).

The guide is @ https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/. Feel free to ping me to review the PR.

@webknjaz webknjaz moved this to 🧐 @webknjaz's review queue 📋 in 📅 Procrastinating in public Mar 3, 2025
@Pierre-Sassoulas Pierre-Sassoulas added Maintenance Discussion or action around maintaining pylint or the dev workflow Needs PR This issue is accepted, sufficiently specified and now needs an implementation labels Mar 3, 2025
@Pierre-Sassoulas Pierre-Sassoulas added this to the 3.3.5 milestone Mar 3, 2025
@cdce8p
Copy link
Member

cdce8p commented Mar 8, 2025

Just configured trusted publishing on PyPI. Opened #10263 to update the release workflow. Feel free to take a look.

@cdce8p
Copy link
Member

cdce8p commented Mar 8, 2025

We just did a test release. Everything seems to work as expected. @webknjaz If you have additional suggestions for the release workflow, we'd be happy to take a look at them!

https://pypi.org/project/pylint/3.3.5a0/
https://github.com/pylint-dev/pylint/releases/tag/v3.3.5a0
https://github.com/pylint-dev/pylint/actions/runs/13742008950

Also opened pylint-dev/astroid#2696 to add Trusted Publishing for astroid as well.

@webknjaz
Copy link
Contributor Author

webknjaz commented Mar 9, 2025

Looks good overall. I typically sequence the jobs differently and extract the version for the URL in the environment setting. But these are my preferences. You've probably adjusted according to your needs.

luketainton pushed a commit to luketainton/webexmemebot that referenced this issue Mar 9, 2025
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [astroid](https://github.com/pylint-dev/astroid) | project.dependencies | patch | `<=3.3.8` -> `<=3.3.9` |

---

### Release Notes

<details>
<summary>pylint-dev/astroid (astroid)</summary>

### [`v3.3.9`](https://github.com/pylint-dev/astroid/blob/HEAD/ChangeLog#Whats-New-in-astroid-339)

[Compare Source](pylint-dev/astroid@v3.3.8...v3.3.9)

\============================
Release date: 2025-03-09

-   Fix crash when `sys.modules` contains lazy loader objects during checking.

    Closes [#&#8203;2686](pylint-dev/astroid#2686)
    Closes [pylint-dev/pylint#8589](pylint-dev/pylint#8589)

-   Upload release assets to PyPI via Trusted Publishing.

    Refs [pylint-dev/pylint#10256](pylint-dev/pylint#10256)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xOTEuNCIsInVwZGF0ZWRJblZlciI6IjM5LjE5MS40IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJ0eXBlL2RlcGVuZGVuY2llcyJdfQ==-->

Reviewed-on: https://git.tainton.uk/repos/webexmemebot/pulls/472
Reviewed-by: Luke Tainton <luke@tainton.uk>
Co-authored-by: Renovate [BOT] <renovate-bot@git.tainton.uk>
Co-committed-by: Renovate [BOT] <renovate-bot@git.tainton.uk>
luketainton pushed a commit to luketainton/pypilot that referenced this issue Mar 9, 2025
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [astroid](https://github.com/pylint-dev/astroid) | project.dependencies | patch | `==3.3.8` -> `==3.3.9` |

---

### Release Notes

<details>
<summary>pylint-dev/astroid (astroid)</summary>

### [`v3.3.9`](https://github.com/pylint-dev/astroid/blob/HEAD/ChangeLog#Whats-New-in-astroid-339)

[Compare Source](pylint-dev/astroid@v3.3.8...v3.3.9)

\============================
Release date: 2025-03-09

-   Fix crash when `sys.modules` contains lazy loader objects during checking.

    Closes [#&#8203;2686](pylint-dev/astroid#2686)
    Closes [pylint-dev/pylint#8589](pylint-dev/pylint#8589)

-   Upload release assets to PyPI via Trusted Publishing.

    Refs [pylint-dev/pylint#10256](pylint-dev/pylint#10256)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xOTEuNCIsInVwZGF0ZWRJblZlciI6IjM5LjE5MS40IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJ0eXBlL2RlcGVuZGVuY2llcyJdfQ==-->

Reviewed-on: https://git.tainton.uk/repos/pypilot/pulls/314
Reviewed-by: Luke Tainton <luke@tainton.uk>
Co-authored-by: Renovate [BOT] <renovate-bot@git.tainton.uk>
Co-committed-by: Renovate [BOT] <renovate-bot@git.tainton.uk>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Maintenance Discussion or action around maintaining pylint or the dev workflow Needs PR This issue is accepted, sufficiently specified and now needs an implementation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants