kjd / idna

Internationalized Domain Names for Python (IDNA 2008 and UTS #46)
BSD 3-Clause "New" or "Revised" License
248 stars 91 forks source link

RFE: is it possible to start making github releases?πŸ€” #168

Closed kloczek closed 6 months ago

kloczek commented 11 months ago

On create github release entry is created email notification to those whom have set in your repo the web UI Watch->Releases. gh release can contain additional comments (li changelog) or additional assets like release tar balls (by default it contains only assets from git tag) however all those part are not obligatory. In simplest variant gh release can be empty because subiekt of the sent email contains git tag name.

I'm asking because my automation process uses those email notifications by trying to make preliminary automated upgrades of building packages, which allows saving some time on maintaining packaging procedures. Probably other people may be interested to be instantly informed about release new version as well.

Documentation and examples of generate gh releases: https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository https://cli.github.com/manual/gh_release_upload/ https://github.com/jbms/sphinx-immaterial/pull/282 https://github.com/marketplace/actions/github-release https://pgjones.dev/blog/trusted-plublishing-2023/ https://github.com/jbms/sphinx-immaterial/issues/281#issuecomment-1700933026 tox target to publish on pypi and make gh release https://github.com/jaraco/skeleton/blob/928e9a86d61d3a660948bcba7689f90216cc8243/tox.ini#L42-L58

kjd commented 11 months ago

We can explore it if it can be automated. As described in issue #163 an existing nascent effort to automate releases needs work. I am already double writing the release notes in the current method, so whatever evolution should have a single source of truth for release notes that updates (a) the HISTORY file, (b) the tag message, (c) the Github release notes.

kloczek commented 11 months ago

Thank you. In simplest version gh release can be added even with empty comment.

kjd commented 6 months ago

I just posted today's release, v3.7, as a Github release. Will pursue workflow automation to post the release as part of the publish action later.

KaiSchwarz-cnic commented 6 months ago

@kjd maybe worth to have an eye on semantic-release. It is a nodejs tool, but setting a nodejs environment up via github workflow is straight forward.

We're using it as well in all our public repositories which cover different programming languages (Java, Python, Golang, PHP, ...). Exemplary configuration for our Python SDK which is getting published to pypi: https://github.com/centralnicgroup-opensource/rtldev-middleware-python-sdk/blob/master/.releaserc.json

We do the publishing to PyPi still with bash scripts, but let me point you to a better way: https://github.com/abichinger/semantic-release-pypi a plugin for semantic-release which might be a better idea.

Trust me, automating the release process using that tool is leading you to such a great experience. It takes a bit getting familiar with it, but definitely worth it.

HTH

kloczek commented 6 months ago

Thank you very much πŸ‘ πŸ˜„

Just noticed that my automation was able successfully process gh release email notification automatically updating rpm package with your python module πŸ˜‹ 🎺

End of the build log with pytest output ``` + PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-idna-3.7-2.g2v.x86_64/usr/lib64/python3.10/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-idna-3.7-2.g2v.x86_64/usr/lib/python3.10/site-packages + /usr/bin/pytest -ra -m 'not network' ============================= test session starts ============================== platform linux -- Python 3.10.14, pytest-8.1.1, pluggy-1.4.0 rootdir: /home/tkloczko/rpmbuild/BUILD/idna-3.7 configfile: pyproject.toml collected 32 items tests/test_idna.py .......... [ 31%] tests/test_idna_codec.py ......... [ 59%] tests/test_idna_compat.py ... [ 68%] tests/test_idna_other.py . [ 71%] tests/test_idna_uts46.py . [ 75%] tests/test_intranges.py ........ [100%] ============================== 32 passed in 0.18s ============================== + RPM_EC=0 ++ jobs -p + exit 0 Processing files: python-idna-3.7-2.g2v.noarch Executing(%doc): /bin/sh -e /var/tmp/rpm-tmp.19UgT1 + umask 022 + cd /home/tkloczko/rpmbuild/BUILD + cd idna-3.7 + DOCDIR=/home/tkloczko/rpmbuild/BUILDROOT/python-idna-3.7-2.g2v.x86_64/usr/share/doc/python-idna + export LC_ALL= + LC_ALL= + export DOCDIR + /usr/bin/mkdir -p /home/tkloczko/rpmbuild/BUILDROOT/python-idna-3.7-2.g2v.x86_64/usr/share/doc/python-idna + cp -pr /home/tkloczko/rpmbuild/BUILD/idna-3.7/README.rst /home/tkloczko/rpmbuild/BUILDROOT/python-idna-3.7-2.g2v.x86_64/usr/share/doc/python-idna + RPM_EC=0 ++ jobs -p + exit 0 Provides: python-idna = 3.7-2.g2vpython3.10dist(idna) = 3.7 python3dist(idna) = 3.7 Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 Requires: python(abi) = 3.10 Obsoletes: python3-idna Checking for unpackaged file(s): /usr/lib/rpm/check-files /home/tkloczko/rpmbuild/BUILDROOT/python-idna-3.7-2.g2v.x86_64 Wrote: /home/tkloczko/rpmbuild/SRPMS/python-idna-3.7-2.g2v.src.rpm Wrote: /home/tkloczko/rpmbuild/RPMS/python-idna-3.7-2.g2v.noarch.rpm Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.ACCACE + umask 022 + cd /home/tkloczko/rpmbuild/BUILD + cd idna-3.7 + /usr/bin/rm -rf /home/tkloczko/rpmbuild/BUILDROOT/python-idna-3.7-2.g2v.x86_64 + RPM_EC=0 ++ jobs -p + exit 0 ```
kloczek commented 6 months ago

Closing πŸ˜„