Learn how to securely publish Python packages to PyPI using PyPA’s Trusted Publishers through GitLab CI/CD pipelines. This guide covers the configuration of Trusted Publishers, the setup of GitLab environments, and the process of updating project settings to automate package releases while minimizing security risks associated with long-lived API tokens.
Table of contents
Why should I want to use this?How do Trusted Publishers work?EnvironmentsSecurity ConsiderationsPutting it all togetherSort: