Introduction
This article explains how we do package releases for admiral and across all our package extensions. This includes details around planned/scheduled releases, as well as hotfixes.
Release Schedule
A release schedule is maintained on the homepage.
Planning Releases
In the past, whenever we started looking towards a future release, we
would create a new release issue label on GitHub of the form
release Q4-2022 and prioritize these
issues. However, as our backlog is minimal every issue should be
considered a Priority Issue. If an issue is not a Priority, then it
should be sent back to a Discussion Tab and formed into a Priority
issue.
Package Release Process
In the following the most important steps for a planned release and a
hot fix release are described. Depending on the package it may be
helpful to use usethis::use_release_issue() with a
package-specific release_bullets() function.
Planned Release
A package release is done in the following steps:
-
Create the release version:
- Create a new feature branch from
main. - Call
usethis::use_version()to update theVersions:field in theDESCRIPTIONfile and updateNEWS.md(replace “(development version)” with the version to be released) - Create a PR into
mainand merge it. The title of the PR must contain “[skip vbump]”. Otherwise, the vbump workflow sets the version to a development version and CRAN will reject the submission.
- Create a new feature branch from
Bundle and Submit to CRAN: Bundle up from
main(devtools::build(manual = TRUE)) and send off to CRAN. See the chapter in R Packages for more details.Address CRAN feedback: If CRAN asks for modifications, repeat steps 1-2 as necessary.
-
Make a GitHub “release”: Once the package is accepted and available on CRAN, use the release button on GitHub to “release” the package onto GitHub, select the
mainbranch as target, and use a tag of the formvX.Y.Z, e.g.,v1.1.2(see past admiral releases for reference and Releasing to Github section for more details).This releases onto Github, archives the version of code within the
mainbranch, bundles the code into atar.gzfile, builds the website for the released version and stores it in a newvx.y.zfolder on thegh-pagesbranch.
To start development work ahead of the next planned release, immediately create the next development version:
- Create a new feature branch from
main. - Call
usethis::use_dev_version()to updateNEWS.md(adds a new section# admiral (development version)) and update the version in theDESCRIPTIONfile to a development version. - Create a PR into
mainand merge it.
Hot Fix Release
Rarely, we may need to release a hot fix to immediately address a
bug. In the majority of cases, an off-cycle release can be made directly
from the main branch, where bug fixes and new features
would be released earlier than planned, thus avoiding the
patch branch release. However, if new features which are
already in main cannot be released alongside the bug fixes,
a hot fix release from a patch branch is necessary.
A hot fix release is done in the following steps:
Identify and Label Bugs: Identify all the bugs that need to be fixed for this hot fix release and label them with the
"hotfix"label.-
Create and Merge to
patchBranch:Branches addressing the bugs should have Pull Requests merged into a single
patchbranch NOT themainbranch.-
The
patchbranch must be created from the most recent release of the package. To do this, run the following git commands: There is no need to use development versions. I.e., the first pull request should set the version in
DESCRIPTIONto the version to be released and a corresponding heading should be added toNEWS.md.
Branch Naming: When naming the branch, follow the naming conventions guide.
-
Bundle and Submit to CRAN:
- If all PRs for the hot fix are merged (to
patch), bundle up frompatch(devtools::build(manual = TRUE)). - Send the package off to CRAN. See the chapter in R Packages for more details.
- If all PRs for the hot fix are merged (to
Address CRAN Feedback: If CRAN asks for modifications, repeat steps 1-4 as necessary.
-
Release to GitHub:
- Once the package is accepted and available on CRAN, use the release button on GitHub to “release” the package onto GitHub.
- Select the
patchbranch as the target, and use a tag of the formvX.Y.Z, e.g.,v1.1.2(see past admiral releases for reference and Releasing to Github section for more details). - This process:
- Archives the version of code within the
patchbranch. - Attaches the News/Changelog file.
- Bundles the code into a
tar.gzfile. - Builds the website for the released version and stores it in a new
vx.y.zfolder on thegh-pagesbranch.
- Archives the version of code within the
Merge into
main: The hot fixes should then be merged into themainbranch through an additional Pull Request. Merging the PR will update the version in theDESCRIPTIONfile to a development version.-
Create the Next Development Version:
- Create a new feature branch from
main. - Update
NEWS.md(add a new section# admiral (development version)). - Create a PR into
mainand merge it.
- Create a new feature branch from
Releasing to Github
Under the Releases
section in the main repo, select Draft a New Release.
Proceed by creating the appropriate release tag and header, denoted as
vX.X.X and admiral X.X.X respectively, for the
release:

Copy the contents of the NEWS.md section for the
release, paste it into the release notes section:

Then in the upload box where it says, “Attach binaries by dropping
them here or selecting them” upload the appropriate
admiral_X.X.X.tar.gz file available for download at the CRAN
website. Click Publish Release and you’re all done!
NB: Occasionally, you might need to delete the tag when something is done in error. Deleting a tag can not be done on GitHub and must be done in the terminal. However, it is very easy!! Just use:
git push --delete origin tagname
Release Tracking
When a new package release has been submitted to CRAN and is awaiting go-live, you can track its status by searching for it within this dashboard.
