Title: Build & release to PyPI via trusted publishing by hugovk · Pull Request #148 · python/python-docs-theme · GitHub
Open Graph Title: Build & release to PyPI via trusted publishing by hugovk · Pull Request #148 · python/python-docs-theme
X Title: Build & release to PyPI via trusted publishing by hugovk · Pull Request #148 · python/python-docs-theme
Description: We discussed in the last monthly docs meeting to automate PyPI deploys using the new "Trusted Publishing", and the consensus was it's a good idea: https://blog.pypi.org/posts/2023-04-20-introducing-trusted-publishers/ This would make releasing easier, and also open the release process to other core devs with the commit bit. Here's a PR to set up the workflow, we'll also need to set up trusted publishing on TestPyPI and PyPI. This workflow does three things: It is based on @hynek's neat https://github.com/python-attrs/attrs/blob/main/.github/workflows/pypi-package.yml, which I'm successfully using in my own projects. 1. For all runs, it builds and lints the PyPI sdist and wheel. This makes sure the non-publishing steps are working smoothly, ahead of uploading. It uses @hynek's excellent https://github.com/hynek/build-and-inspect-python-package action, which creates a nice summary, for example: We can see it creates three handy zips if we want to check what would be uploaded to PyPI, and three handy toggles that show the contents. Try it here: https://github.com/python/python-docs-theme/actions/runs/5919197594?pr=148 2. For commits to main we publish to TestPyPI. This helps us know the publishing process is nicely oiled to avoid surprises on release day. It uses the packages that were already created in step 1. 3. For published GitHub releases we publish to the real PyPI. Also uses packages created in step 1. TODO [n/a] Set up trusted publishing on TestPyPI: Go to https://test.pypi.org/manage/project/python-docs-theme/settings/publishing/ Add a new publisher like: screenshot Set up trusted publishing on PyPI: Go to https://pypi.org/manage/project/python-docs-theme/settings/publishing/ Add a new publisher as above @willingc I see you're the only maintainer for https://test.pypi.org/project/python-docs-theme/, please could you set up the above for TestPyPI? It's probably a good opportunity to add some extra owners/maintainers such as @Mariatta, to improve the bus factor. @willingc You're also one of the maintainers for https://pypi.org/project/python-docs-theme/, so perhaps you could do PyPI too?
Open Graph Description: We discussed in the last monthly docs meeting to automate PyPI deploys using the new "Trusted Publishing", and the consensus was it's a good idea: https://blog.pypi.org/posts/2023-04...
X Description: We discussed in the last monthly docs meeting to automate PyPI deploys using the new "Trusted Publishing", and the consensus was it's a good idea: https://blog.pypi.org/p...
Opengraph URL: https://github.com/python/python-docs-theme/pull/148
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:35147987-2715-d4db-2852-646f24b6d8f8 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | B86E:250F5A:8F507C:B9EC2C:69744F3E |
| html-safe-nonce | f05503f298383c3c55da940ef68f44f35650f3c97339fca7d95ba12176392c7e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCODZFOjI1MEY1QTo4RjUwN0M6QjlFQzJDOjY5NzQ0RjNFIiwidmlzaXRvcl9pZCI6IjU3NjkzNzYwODUyNTgyOTMwNTQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | ee3adef8bae042bc3e8d853091ac99177bb3adfa225ea45b76cfc21a3d9f5e2c |
| hovercard-subject-tag | pull_request:1481882391 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/python/python-docs-theme/pull/148/files |
| twitter:image | https://avatars.githubusercontent.com/u/1324225?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/1324225?s=400&v=4 |
| og:image:alt | We discussed in the last monthly docs meeting to automate PyPI deploys using the new "Trusted Publishing", and the consensus was it's a good idea: https://blog.pypi.org/posts/2023-04... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | e0b95d743b7672c9ac0e1032d5f117950182dc164a83434a7db86510e8f0b37c |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/python/python-docs-theme git https://github.com/python/python-docs-theme.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 93341818 |
| octolytics-dimension-repository_nwo | python/python-docs-theme |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 93341818 |
| octolytics-dimension-repository_network_root_nwo | python/python-docs-theme |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 56fe7e2e8de6e57740bca50402351ea656f7a4bf |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width