Release process
Source:RELEASING.md
gaussianprocesses uses R package versions of the form MAJOR.MINOR.PATCH. Development versions on the default branch append .9000, for example 0.1.0.9000.
From 1.0.0 the versions follow semantic versioning, as set out under “Stability and versioning” in CONTRIBUTING.md:
- Major releases may change stable interfaces incompatibly, including removing deprecated names.
- Minor releases add features, deprecate stable names, and may change experimental interfaces.
- Patch releases only fix defects, compatibly.
Below 1.0, minor releases may also contain documented breaking changes to stable interfaces.
The release after 0.1.0 is 1.0.0, the first on CRAN (#40). It removed the names deprecated after 0.1.0 without a release of warnings; NEWS says so.
Releases are listed on the GitLab releases page. Nothing is ever published automatically: pushes, merge requests, schedules, and tags never publish a release.
1. Prepare
Prepare the release in a normal merge request.
-
Version. Choose the version by the rules above:
- a patch release only if nothing but compatible fixes changed;
- a minor release for new features, deprecations, and changes to experimental interfaces;
- a major release for incompatible changes to stable interfaces.
Set
Version:inDESCRIPTIONto it, without the.9000suffix. -
Release notes. Rename the
# gaussianprocesses (development version)heading inNEWS.mdto# gaussianprocesses X.Y.Zand review its entries. These lines become the release notes. Check that they list:- every change to an experimental interface;
- every new deprecation;
- in a major release, every removal.
-
Documentation. Regenerate the reference pages and
NAMESPACE, then rebuild the site and review it inpublic/:roxygen2::roxygenise() pkgdown::build_site() -
Local tests.
testthat::test_local() -
R CMD check. From the repository root:
devtools::check()is equivalent. There must be no ERROR or WARNING. Only CRAN-incoming NOTEs are expected, such as the one for a package that is not yet on CRAN.The tests also check the stability tiers and the model format: every export has a tier on its help page and in the reference index, and models saved by 0.1.0 and schema-4 models are read and give the same results.
Merge. Make sure the merge-request pipeline passes, merge, and confirm that the default-branch pipeline passes and the Pages site deploys.
2. CRAN submission
CRAN receives the built source tarball, not the working tree. Check the tarball that will be submitted, and submit only after every check below is clean.
-
CRAN checks in CI. Start a manual pipeline for the release-candidate commit with
CRAN_CHECK=true.- The
cran-checkjob installs every package inSuggestsand runsR CMD check --as-cranon the built tarball with its tests, as CRAN does. - The
text-checksjob runs the spelling and URL checks (ci/text-checks.R). Add correctly spelled words toinst/WORDLIST.
- The
-
Local checks. On the tarball, from a clean copy of the tree:
-
_R_CHECK_CRAN_INCOMING_=true R CMD check --as-cranshould report only the “New submission” NOTE on a first submission, and nothing for later versions. -
_R_CHECK_DEPENDS_ONLY_=true R CMD check --as-cranchecks that suggested packages are used only conditionally.
-
-
Platform checks. Submit the same tarball to:
- win-builder, with R-release and R-devel:
devtools::check_win_release()anddevtools::check_win_devel(), or the upload form at https://win-builder.r-project.org/upload.aspx; - the macOS builder, at https://mac.r-project.org/macbuilder/submit.html;
- at least two R-hub Linux platforms, for example with
rhub::rc_submit(platforms = c("linux", "ubuntu-release"))(the R Consortium runners, which need no GitHub repository).
DESCRIPTION. Link them in the release issue. - win-builder, with R-release and R-devel:
-
Submission comments. Update
cran-comments.mdwith the environments and results from steps 1 to 3, and remove everypendingmarker. - Name. Check again that no current or archived CRAN package, and no current Bioconductor package, has the same name, ignoring case.
-
Submit. Upload the tarball with the CRAN submission form, paste
cran-comments.mdas the comments, and confirm the email CRAN sends to the maintainer. Do not submit again while a submission is pending.
The target is no ERRORs, no WARNINGs, and no NOTEs except “New submission”. Explain any unavoidable NOTE in the comments.
Resubmission
If CRAN asks for changes:
- Fix them in a merge request, and answer each point under a
## Resubmissionheading at the top ofcran-comments.md. - Increase the version if the reviewers ask for it; otherwise keep it, since the version was not published.
- Repeat steps 1 to 4 on the new tarball.
- Submit with the same form, noting in the comments that it is a resubmission.
After acceptance, tag and publish the GitLab release from the accepted commit (section 3).
3. Publish
Releases are published only from a manually started pipeline on main. Open Build > Pipelines, select New pipeline, choose main, and add the variable RELEASE_TAG=vX.Y.Z. These links open the form prefilled; replace X.Y.Z first:
- Dry run, which runs every check and publishes nothing:
https://gitlab.com/DiogoRibeiro7/gaussian-processes-r/-/pipelines/new?ref=main&var[RELEASE_TAG]=vX.Y.Z&var[RELEASE_DRY_RUN]=true - Release:
https://gitlab.com/DiogoRibeiro7/gaussian-processes-r/-/pipelines/new?ref=main&var[RELEASE_TAG]=vX.Y.Z
The release job runs only after the check and docs stages succeed, and release jobs are serialized with a resource group. It uses the CI job token; no personal token or CLI installation is needed.
Before publishing anything, the job checks that:
-
RELEASE_TAGisvfollowed by the exactDESCRIPTIONversion; -
NEWS.mdcontains a non-empty# gaussianprocesses X.Y.Zsection; - the source tarball built by
r-cmd-checkexists; - the tag either does not exist yet or already points at the pipeline commit;
- no release with this tag exists.
It then:
- uploads
gaussianprocesses_X.Y.Z.tar.gzto the project’s generic package registry; - creates the GitLab release, with the
NEWS.mdsection as its notes and the tarball as an asset; - creates the annotated tag
vX.Y.Zat the pipeline commit if it does not already exist.
Tags are immutable: never move or delete a published tag. The guards are tested by ci/tests/release-test.sh, which uses a temporary local repository and never contacts GitLab.
Without GitLab CI
If CI is unavailable, publish the same release by hand from an up-to-date main:
R CMD build .
R CMD check --as-cran gaussianprocesses_X.Y.Z.tar.gz
git tag --annotate vX.Y.Z --message "gaussianprocesses X.Y.Z"
git push origin vX.Y.ZThen create a release for the tag under Deploy > Releases, paste the NEWS.md section as its notes, and attach the tarball.
4. After the release
In a new merge request, bump Version: to the next development version (for example 1.0.0.9000) and add a new # gaussianprocesses (development version) heading at the top of NEWS.md.
Verify installation
Download the source package from the release assets and install it:
install.packages("gaussianprocesses_X.Y.Z.tar.gz", repos = NULL, type = "source")
packageVersion("gaussianprocesses")