DataShades / ckanext-oidc-pkce

GNU Affero General Public License v3.0
1 stars 5 forks source link

Request for Information: Pypi publications steps for this plugin. #3

Open duttonw opened 1 week ago

duttonw commented 1 week ago

Hi @smotornyuk

I'm one of my maintainers of data.qld.gov.au publications.qld.gov.au ckan instances. Which is deployed by https://github.com/qld-gov-au/ckan-qld-infrastructure/ .

I'm wondering if you can provide commands you run to deploy this plugin repo to pypi as you have been keeping it quite up to date in last last couple of years.

The reason i'm asking is that I'm looking for a general standardized approach that people use on packaging and deployed to pypi.

If you can you provide your steps (without creds etc) that you follow it would be great since with that I may be able to contribute a fully automated github action workflow for you based on it.

Also just a heads up, my area will be contributing features into your product to handle logout correctly for SSO users. You can get a sneak peak at https://github.com/DataShades/ckanext-oidc-pkce/compare/master...qld-gov-au:ckanext-oidc-pkce:develop

Regards,

@duttonw

smotornyuk commented 1 week ago

Yes, sure. I'm using conventional commit messages and compile them into CHANGELOG.md using git-changelog. That's why my standard release workflow looks like:

  1. Update version of the package inside setup.cfg or whatever place keeps the version
  2. Build changelog via git changelog -c conventional -o CHANGELOG.md -B <NEW.VERSION.NUMBER>
  3. commit changes with chore: update changelog/bump version message.
  4. build the package via python -m build
  5. Upload the package to PyPI via twine upload dist/*. I'm using ~/.pypirc config so credentials are not specified in CLI
  6. Remove dist folder
duttonw commented 1 week ago

Hi @smotornyuk ,

Thanks for the bootstrap on deployment.

You can have a look at a crude auto deployment using github provide oidc auth.

https://github.com/ckan/ckanext-xloader/blob/master/.github/workflows/publish.yml#L96

pypi config you can see here: https://github.com/ckan/ckanext-xloader/issues/214#issuecomment-2415189905 and GitHub environment setup (so you can restrict who can deploy) https://github.com/ckan/ckanext-xloader/issues/214#issuecomment-2415384199

I'm still working on major improvements and it does require a 'Service Account bot' for proper 'bump' commit deployments via github actions.

https://github.com/ckan/ckanext-xloader/issues/229