Your first release#

In this tutorial, we will release a small Python package with repoplone. We will describe it in repository.toml, write a news fragment, rehearse the release, and run it.

The repository lives only on your computer. It has no remote and its package is not published. Nothing leaves your computer.

You need uv and git.

Create the repository#

Create a folder with a git repository, and the folders the package needs.

mkdir hello-plone
cd hello-plone
git init -b main
mkdir -p src/hello_plone news

Create src/hello_plone/__init__.py with the version of the package.

__version__ = "1.0.0"

Create version.txt with the version of the repository.

1.0.0

Create pyproject.toml. It tells hatch where the version is, and tells towncrier where the news fragments and the changelog are.

[project]
name = "hello-plone"
dynamic = ["version"]
description = "A package to try repoplone."
requires-python = ">=3.12"

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.hatch.version]
path = "src/hello_plone/__init__.py"

[tool.towncrier]
directory = "news/"
filename = "CHANGELOG.md"
start_string = "<!-- towncrier release notes start -->\n"
title_format = "## {version} ({project_date})"
underlines = ["", "", ""]

Create CHANGELOG.md. towncrier writes each release below the marker line.

# Changelog

<!-- towncrier release notes start -->

Describe the repository#

Create repository.toml.

spec_version = "2"

[repository]
name = "hello-plone"
changelog = "CHANGELOG.md"
version = "version.txt"

[repository.release]
steps = ["changelog", "version", "repository", "release_python", "git", "bye"]

[[package]]
type = "python"
name = "hello-plone"
path = "."
changelog = "CHANGELOG.md"
towncrier.settings = "pyproject.toml"
publish = false

The [repository] table names the repository, its changelog, and its version file. The [[package]] table declares one Python package at the root of the repository. publish = false keeps it off PyPI.

The [repository.release] table lists the release steps. It leaves out gh_release, because this repository is not on GitHub.

Commit the files.

git add .
git commit -m "Start hello-plone"

Ask repoplone for the versions.

uvx repoplone@2.0.0a2 versions current
           Current versions
┏━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━┓
┃ Section    ┃ Name        ┃ Version ┃
┡━━━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━┩
│ Repository │ hello-plone │ 1.0.0   │
│ python     │ hello-plone │ 1.0.0   │
└────────────┴─────────────┴─────────┘

Notice that repoplone reads two versions. The repository version comes from version.txt. The package version comes from the package itself, through hatch.

Write a news fragment#

A news fragment is a small file that describes one change. Its name is the issue number and the type of change.

Create news/1.feature.

Say hello to Plone.

See the changelog entry the release will write.

uvx repoplone@2.0.0a2 changelog preview
==================================================
## 1.0.0 (2026-12-03)

### hello-plone

#### Features

- Say hello to Plone. (#1)

==================================================

The preview uses the current version, because the next one is not chosen yet.

Choose the version#

See where each bump keyword leads.

uvx repoplone@2.0.0a2 versions next

The table lists minor with 1.1.0. A new feature calls for a minor release.

Rehearse the release#

Run the release with --dry-run.

uvx repoplone@2.0.0a2 release --dry-run minor

repoplone first warns that it has no GitHub token. The release has no GitHub step. Answer y.

It then runs each step, and asks you to confirm the changelog entry and the version. Answer y to each question.

02/06 Next version
   - Bump version from 1.0.0 to 1.1.0
   Continue? [y/n] (y): y
03/06 Update repository components
   - Would update CHANGELOG.md file
   - Would update version.txt file

04/06 Release Python packages
   - Released hello-plone: 1.1.0

05/06 Commit changes, create tag
   - Skipped creating tag 1.1.0

Check the working tree.

git status --short

It prints nothing. The dry run changed no file.

Release#

Run the same command without --dry-run, and answer y to each question.

uvx repoplone@2.0.0a2 release minor

This time, the steps write.

03/06 Update repository components
   - Updated CHANGELOG.md file
   - Updated version.txt file

04/06 Release Python packages
   - Released hello-plone: 1.1.0

05/06 Commit changes, create tag
   - Created tag 1.1.0

06/06 Summary and goodbye
   - Completed the release of version 1.1.0 from version 1.0.0

Look at the result#

Read the changelog.

cat CHANGELOG.md
# Changelog

<!-- towncrier release notes start -->

## 1.1.0 (2026-12-03)

### Features

- Say hello to Plone. (#1)

The news fragment is now a changelog entry, and the file news/1.feature is gone.

Look at the history and the tags.

git log --oneline
git tag
9a06bcb Release 1.1.0
9559186 Start hello-plone
1.1.0

repoplone committed the release as Release 1.1.0 and tagged it 1.1.0. version.txt and src/hello_plone/__init__.py both hold 1.1.0.

You have released a package with repoplone. A real project adds a remote, a GitHub release, and packages that get published, and the steps stay the same.

See also