I guess this one is top-posting...  Anyways, I would personally default
away from CI-provider-specific solutions.  It seems like a command line
tool ought to suffice?  But maybe there's some security something or
other I'm missing.  I just see that we presently use four CI systems so
picking one and expecting to stick with it seems a bit naive. 

Presumably someone will (helpfully) find an issue with this but I've
copied this between a few projects. 

https://github.com/altendky/pyqt5-tools/blob/b0ecb9bf53ded53c28763d76f1e87d0b8180d2b8/twineontag.py


I know there are many other solutions. 

Since this topic is a bit more general than just PyPI uploads I've also
got a few comments about towncrier.  Per the link below I added
towncrier to my RTD builds so that PRs will render the newsfragments. 
Also, I started to vaguely think through some option for using towncrier
that would allow for creating a release by pushing a tag rather than
pulling a PR and doing various manual steps and modifying a generated
news file etc.  No answers yet, just a thing I'd like to get going at
some point.  Certainly `release by pushing a tag` is harder in bigger
projects but I don't have in mind yet a reason it can't happen. 

https://github.com/altendky/qtrio/blob/7a268c3fc14afe4cde7cbedd423d1f74f616a299/docs/source/conf.py#L133-L148


Cheers, 

-kyle 

On 2020-09-28 13:48, Glyph wrote:

> Yes, please, let's do this!  I have been trying to fix or enable automated 
> releases for smaller Twisted-org projects as I have time, but Twisted itself 
> is a bit too tricky for my level of capacity during the end times. 
> 
> Kyle Altendorf has done quite a bit of work on this, so let's be sure to 
> leverage that work and not to start over: 
> https://twistedmatrix.com/trac/ticket/9531. 
> 
> -g
> 
> On Sep 28, 2020, at 9:25 AM, Craig Rodrigues <rodr...@crodrigues.org> wrote: 
> 
> Adi, 
> 
> In this Twisted subprostlject, you implemented something which releases to 
> Pypi upon creation of a tag: 
> 
> https://github.com/twisted/twistedchecker/blob/master/.travis.yml#L23 
> 
> Maybe we can do something similar for the main Twisted project. 
> 
> GitHub Actions allows you to run a specific workflow in response to a GitHub 
> Release event:
> 
> https://github.com/actions/create-release 
> https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows#release
>  
> 
> So maybe we can implement your suggested steps in a new GitHub Actions 
> workflow specific to doing a release. 
> 
> -- 
> Craig 
> 
> On Thu, Sep 24, 2020 at 4:32 PM Adi Roiban <a...@roiban.ro> wrote: 
> 
> Maybe the release can be simplified and automated: 
> 
> * Build the source and binary wheel in GitHub actions as this can be done for 
> Linux (Ubuntu), Windows and macOS. 
> * Host the download source and wheel files only on PyPi and publish them 
> automatically from GitHub action on a new tag is created. 
> * Host the documentation only on the Read The Docs. 
> * Hos the API documentation on Read The Docs - might need some hacking, but 
> at release we can create an API docs package as an artifact which is then 
> pulled when Read The Docs documentation is created and copied as extra HTML 
> files. 
> * Move Twisted blog to GitHub pages... or even read the docs with a separate 
> theme like Crate [1] ... if the blog is still required. 
> 
> ------ 
> 
> With the above implemented the release should look like: 
> 
> * Each time the tests for a PR are executed, pydoctor will run and 
> automatically create the API files as an artifact available for download. 
> * Manually create a new branch in which the version is updated and the 
> changelog/news/release note is created and all the news fragment files are 
> removed/ . Have the branch reviewed and approved with all the tests passed. 
> When the pydoctor tests are executed, the API docs are created. 
> * The release branches can have a naming convention line 'release-20.0.0`. At 
> first the release branch can have a release candidate version and a GitHub 
> can automatically push the release to PyPi. 
> * Manually send an email to Twisted mailing list to announce the pre-release. 
> * Once the branch is merged, manually push a new tag 
> * The new tag should trigger the GitHub action for publishing the release on 
> PyPi 
> * The new merge in master should trigger the Read The Docs build... which now 
> will also include the static API docs pages. 
> * Once the release is done, manually send a new email to the mailing list. 
> 
> There are still many manual steps, but the only permissions required is 
> commit to the repo. 
> This will no longer use any of the Twisted own infrastructure. 
> 
> [1] https://sphinx-themes.org/html/crate-docs-theme/crate/basic.html 
> -- 
> Adi Roiban _______________________________________________
> Twisted-Python mailing list
> Twisted-Python@twistedmatrix.com
> https://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python 
> _______________________________________________
> Twisted-Python mailing list
> Twisted-Python@twistedmatrix.com
> https://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

_______________________________________________
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
https://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
_______________________________________________
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
https://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Reply via email to