R packages
GxP
Git
Foundations series · part 9

Releases & changelogs

Versions that mean something, notes users can read, tags you can go back to

Adopt semantic versioning, readable changelogs, and annotated git tags to support change control.
Published

2026-09-26

Modified

2026-09-27

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: node

What we observed:

  • A chore: commit opened no release PR. Only feat, fix and 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_TOKEN don’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.9000

fledge: 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.md

At 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).

Tags and GitHub Releases

  • Tag every release (v1.3.0). remotes::install_github("org/pkg@v1.3.0") then installs exactly that code, and renv.lock can record it.
  • A GitHub Release attaches notes (and optionally the built tarball) to the tag.
  • For validation-ready deployments, the tag plus release notes plus CI results for that commit are your evidence of what was assessed.

Pitfalls

  • Forgetting the dev version. A released 1.3.0 and a work-in-progress 1.3.0 look identical in sessionInfo(). Always use_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

R package documentation

NoteUpdates
  • 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.