From d1c0e42a560d2edde55a0238fc71dd83cb43fcc3 Mon Sep 17 00:00:00 2001 From: crimsonknave Date: Thu, 12 Dec 2024 11:10:52 -0500 Subject: [PATCH 1/2] Add release instructions --- CONTRIBUTING.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4393ba0..18065b4 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -36,6 +36,15 @@ Here are a few things you can do that will increase the likelihood of your pull - Keep your change as focused as possible. If there are multiple changes you would like to make that are not dependent upon each other, consider submitting them as separate pull requests. - Write a [good commit message](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html). +## Release a Version +Releasing a version is as simple as creating and pushing a tag. A few rules are enforced for tags, the tag must be signed, they cannot be updated or deleted and `Coverage`, `pyright` and `ruff` must be passing (Coverage ensures the pytest matrix also passed). + +Simply run `git tag --sign v0.0.0` (inserting the correct version). Then, `git push origin v0.0.0`. CI will build, publish to Pypi and then create a GitHub Release with the artifacts. + +Technically, the tag name does not matter, it's not used for the version published, that pulls from `__init__.py`. But, it is how anyone will be able to browse the code at a particular version, so it should be set correctly. + +All commits pushed to the repo will also be built and pushed to testpypi. This CI job will fail if the version already exists there. During development set a version in the pattern of `0.0.0.dev0` and increment `dev0` for every new release you'd like to test externally. Then, you can [install the package from testpypi](https://packaging.python.org/en/latest/guides/using-testpypi/). Once the release is finalized, remove the `dev` from the version and ensure the version is updated following [semver](https://semver.org/) by bumping the major, minor or patch version as appropriate. + ## Resources - [How to Contribute to Open Source](https://opensource.guide/how-to-contribute/) From 8e3077a956c4d823e64857098764369e8d44c8bb Mon Sep 17 00:00:00 2001 From: crimsonknave Date: Fri, 13 Dec 2024 13:15:07 -0500 Subject: [PATCH 2/2] Fix homepage url --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 996adf4..6c02364 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -30,7 +30,7 @@ dependencies = [ annotated_logger = "annotated_logger.mocks" [project.urls] -Homepage = "https://github.com/github/annotated_logger" +Homepage = "https://github.com/github/annotated-logger" [tool.hatch.version] path = "annotated_logger/__init__.py"