pythonazure-devopsgithub-actionsazure-artifactstwine

Upload a Python Package to Azure Artifacts Using a Github Action


I have a repository on Github for a private Python package for my organization, and I would like to publish this package in a private Azure Artifacts feed using Github actions for automated CI/CD.

It seems like none of the documentation around publishing to Azure Artifacts is for this exact scenario; the documentation from ADO is solely for using Azure Pipelines, or seems to require manual action (for instance, trying to use artifacts-keyring). Is there some way to provide twine with credentials in a Github Actions YAML file that would enable me to publish to my private ADO?


Solution

  • You can save the authentication information in the project file of Repository, and then run Publish Python packages from the command line in your Github Actions.