Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions docs/project-release.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,19 @@ icon: lucide/rocket

Release version numbers should follow [Semantic Versioning][semver].

To create a new release, simply create and push a tag with the new release
version number:
To create a release, run `poe release` with one of `patch`, `minor`, or `major`
corresponding to the version number component to update:

```sh
poe release patch|minor|major
```

A new tag with the new release version number will be created automatically
using [bump-my-version][bump-my-version] (for example, `v1.2.3`).

Afterward, push the new release tag:

```sh
git tag vX.Y.Z # for example, v1.2.3
git push --tags
```

Expand All @@ -21,5 +29,6 @@ git push --tags
* If container image build and publishing is enabled, a container image will be
built and published to the [GitHub Container Registry (GHCR)][ghcr-docs].

[bump-my-version]: https://callowayproject.github.io/bump-my-version/
[ghcr-docs]: https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry
[semver]: https://semver.org/
15 changes: 12 additions & 3 deletions docs/releasing.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,19 @@ icon: lucide/rocket

Release version numbers should follow [Semantic Versioning][semver].

To create a new release, simply create and push a tag with the new release
version number:
To create a release, run `poe release` with one of `patch`, `minor`, or `major`
corresponding to the version number component to update:

```sh
poe release patch|minor|major
```

A new tag with the new release version number will be created automatically
using [bump-my-version][bump-my-version] (for example, `v1.2.3`).

Afterward, push the new release tag:

```sh
git tag vX.Y.Z # for example, v1.2.3
git push --tags
```

Expand All @@ -24,6 +32,7 @@ git push --tags

[![PyPI][pypi-badge]][pypi-project]

[bump-my-version]: https://callowayproject.github.io/bump-my-version/
[github-release-latest]: https://github.com/smkent/copier-python/releases/latest
[github-releases]: https://github.com/smkent/copier-python/releases
[github-release-badge]: https://img.shields.io/github/v/release/smkent/copier-python
Expand Down
12 changes: 12 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ Issues = "https://github.com/smkent/copier-python/issues"

[dependency-groups]
dev = [
"bump-my-version>=1.3.0",
"copier>=9",
"poethepoet>=0.42",
"prek>=0.3",
Expand All @@ -53,6 +54,13 @@ docs = [
"zensical>=0.0.33",
]

[tool.bumpversion]
commit = false
tag = true
tag_name = "v{new_version}"
tag_message = ""
push = true

[tool.hatch.build.targets.sdist]
include = ["/copier_python", "/tests", "*.md", "LICENSE"]

Expand Down Expand Up @@ -107,6 +115,10 @@ help = "Initialize git repository once on project creation"
cmd = "prek run --all-files"
help = "Run all formatters and static checks"

[tool.poe.tasks.release]
cmd = "bump-my-version bump -v"
help = "Create and push a release tag (patch/minor/major)"

[tool.poe.tasks.lt]
sequence = [{ref = "lint"}, {ref = "test"}]
help = "Run all formatters, static checks and tests"
Expand Down
12 changes: 12 additions & 0 deletions template/pyproject.toml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ Issues = "https://github.com/{{ github_user }}/{{ project_name }}/issues"

[dependency-groups]
dev = [
"bump-my-version>=1.3.0",
"poethepoet>=0.42",
"prek>=0.3",
{%- if project_visibility == 'public' %}
Expand All @@ -61,6 +62,13 @@ docs = [
]
{%- endif %}

[tool.bumpversion]
commit = false
tag = true
tag_name = "v{new_version}"
tag_message = ""
push = true

[tool.hatch.build.targets.sdist]
include = ["/{{ project_slug }}", "/tests", "*.md", "LICENSE"]

Expand Down Expand Up @@ -125,6 +133,10 @@ help = "Run all formatters and static checks"
sequence = [{ref = "lint"}, {ref = "test"}]
help = "Run all formatters, static checks and tests"

[tool.poe.tasks.release]
cmd = "bump-my-version bump -v"
help = "Create and push a release tag (patch/minor/major)"

[tool.poe.tasks.setup]
sequence = [
{cmd = "uv sync"},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,19 @@ icon: lucide/rocket

Release version numbers should follow [Semantic Versioning][semver].

To create a new release, simply create and push a tag with the new release
version number:
To create a release, run `poe release` with one of `patch`, `minor`, or `major`
corresponding to the version number component to update:

```sh
poe release patch|minor|major
```

A new tag with the new release version number will be created automatically
using [bump-my-version][bump-my-version] (for example, `v1.2.3`).

Afterward, push the new release tag:

```sh
git tag vX.Y.Z # for example, v1.2.3
git push --tags
```

Expand All @@ -32,6 +40,7 @@ git push --tags
the [GitHub Container Registry (GHCR)][ghcr-docs].
{%- endif %}

[bump-my-version]: https://callowayproject.github.io/bump-my-version/
{% if enable_container -%}
[ghcr-project]: {{ repo_url }}/pkgs/container/{{ project_name }}
{% endif -%}
Expand Down
Loading
Loading