ko-zu / psl

publicsuffixlist for python
Mozilla Public License 2.0
61 stars 10 forks source link

Create a GitHub actions action to automatically update the library with PSL updates. #25

Closed aaomidi closed 1 year ago

aaomidi commented 1 year ago

It'd be nice to not have to rely on a person to get the latest updates.

ko-zu commented 1 year ago

It seems it can be possible by modifying setup.py and PSL periodically... but might need some time for me to get it to work without disrupting existing branches and forks. Is there any example project that does this sort of automation, injecting external resources to the release branch?

4ft35t commented 1 year ago

A better way is download https://raw.githubusercontent.com/publicsuffix/list/master/public_suffix_list.dat while setup.

jlaundry commented 1 year ago

@ko-zu I've just created a PR (#26) that automates downloading the PSL and bumping the version number. I havne't automated the submission to PyPI, but could look at this as well if you'd like :)

ko-zu commented 1 year ago

@jlaundry Thank you for the pull request. I have just pushed my integration attempt as PR #27, which includes periodic updates and packaging automation. It mostly does the same thing as yours on updating and patching version numbers, but my version also creates a new package automatically after passing the pytest test suite. As long as the codebase remains unchanged, there is no need for manual intervention. This script has been running (with minor modifications) on a testing repository, https://github.com/ko-zu/gh-actions-sandbox/tags, for a while now.

Do you think this level of automation is excessive? Please let me know your opinion.

jlaundry commented 1 year ago

@ko-zu I've just reviewed your PR, and I don't think it's excessive at all, it's very good! I'll close my PR, and eagerly await this being pushed to prod 😁

ko-zu commented 1 year ago

The first automated tag was generated https://github.com/ko-zu/psl/releases/tag/v0.9.4 I will change the release target from testpypi to pypi once the scheduled action successfully pushes the update.

ko-zu commented 1 year ago

I just pushed v0.10.0 to the master branch. Thank you all for your contributions!

https://github.com/ko-zu/psl/releases/tag/v0.10.0 https://pypi.org/project/publicsuffixlist/0.10.0.20230429/