Releases & changelogs
Versions that mean something, notes users can read, tags you can go back to
Why bother
A release answers three questions: what changed (NEWS/CHANGELOG), how big was the change (the version number), and what exact code is it (a git tag). In GxP work a release is also what gets assessed and deployed, so the release notes feed your change-control and validation records.
Semantic versioning in one table
| Bump | When | R package example |
|---|---|---|
major 2.0.0 |
Existing code can break | Removed km_plot(risk = ); required R ≥ 4.3 |
minor 1.3.0 |
New features, nothing breaks | New forest_plot() |
patch 1.2.1 |
Bug fixes only | read_adsl() keeps labels again |
R adds a development convention: between releases the version is x.y.z.9000 (usethis::use_dev_version()), so a bug report’s sessionInfo() shows the code wasn’t a release.
With Conventional Commits, the bump can be computed. feat → minor, fix → patch, ! or BREAKING CHANGE → major.
The web-repo way: release-please
Our website uses release-please. On every push to main it reads the new Conventional Commits and keeps one release PR open. That PR bumps package.json, writes CHANGELOG.md grouped by type, and lists what’s coming. Merging it tags the release and creates a GitHub Release.
# .github/workflows/release-please.yml
on:
push:
branches: [main]
permissions:
contents: write
pull-requests: write
jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: googleapis/release-please-action@v5
with:
release-type: nodeWhat we observed:
- A
chore:commit opened no release PR. Onlyfeat,fixand breaking changes trigger one. - The repo setting Allow GitHub Actions to create and approve pull requests must be on.
- According to GitHub’s docs, PRs opened with the default
GITHUB_TOKENdon’t trigger other workflows, so CI won’t run on the release PR unless you use a separate token.
For R, release-please doesn’t fit. Its documented strategies cover Node, Python, Rust, Java, Go and others, but not R. The generic simple strategy bumps a version.txt, which isn’t where R keeps its version (DESCRIPTION).
The R way
usethis: the manual but reliable path
usethis::use_news_md() # once: create NEWS.md
# ... during development, add a bullet to NEWS.md in each user-facing PR ...
usethis::use_release_issue() # a GitHub issue with a release checklist
usethis::use_version("minor") # bump DESCRIPTION + NEWS.md heading, commit
usethis::use_github_release() # tag + GitHub release from the NEWS.md section
usethis::use_dev_version() # back to x.y.z.9000fledge: NEWS.md from commit messages
fledge (cynkra) builds NEWS.md from your commit history, and optionally bumps DESCRIPTION and tags. Its README says that commits written in Conventional Commits syntax get automatically grouped into changelog sections (Bug Fixes, Documentation, …). That makes it a natural partner for conventional commits’ squash-merge PR titles.
fledge::update_news() # light use: add NEWS.md bullets from commits since the last version
fledge::bump_version() # full use: NEWS.md + dev version bump + tag, run regularly
fledge::finalize_version() # after hand-editing NEWS.mdAt release time, follow the steps in vignette("fledge").
What goes in NEWS.md
Write for users, not for the git log. Say what changed in behaviour, how to migrate, and link the issue:
# clinreport 1.3.0
## New features
* `forest_plot()` draws subgroup forest plots from an ARD (#57).
## Bug fixes
* `read_adsl()` keeps variable labels when reading `.xpt` files (#61).Pitfalls
- Forgetting the dev version. A released
1.3.0and a work-in-progress1.3.0look identical insessionInfo(). Alwaysuse_dev_version()after releasing. - Changelog written from the git log. “Merge branch…” is not a release note. Curate it.
- Breaking changes hidden in a patch. If users must change code, it’s a major bump. In 0.x packages, use at least a minor bump and say so loudly.
- Retagging. Never move a published tag. Release a new version instead.
Sources
Standards and tools
- Semantic Versioning: semver.org
- release-please: github.com/googleapis/release-please
- PRs/workflow runs from
GITHUB_TOKENdon’t trigger other workflows: GitHub Docs: Triggering a workflow - “Allow GitHub Actions to create and approve pull requests” setting: GitHub Docs: Managing GitHub Actions settings for a repository
R package documentation
- usethis (
use_news_md(),use_release_issue(),use_version(),use_github_release(),use_dev_version()): usethis.r-lib.org - fledge: fledge.cynkra.com
- remotes: remotes.r-lib.org
- 2026-09-26: Removed the end-of-post checklist. Marked package-dependent usethis and fledge blocks as .norun.
- 2026-09-27: Added a Sources section.