The steps of a regular CRAN release of the AMR package, as followed for v3.1.0 (October 2026). Replace X.Y.Z with the new version number. Copy this list into an issue or a note per release, or tick the boxes in a local copy.
1. Preparation (on the development version)
2. Version and documentation
5. After acceptance by CRAN
The pre-commit hook in .github/prehooks/ sets the version to X.Y.Z.9NNN and rewrites line 1 of NEWS.md on every commit to main. The release commit must therefore skip the hooks.
git status: only the intended files are changed, with no build leftovers (e.g., AMR_X.Y.Z.tar.gz, AMR.Rcheck/)
Commit the release without hooks, with only the version as message: git add -u && git commit -n -m "vX.Y.Z"
git push origin main (this also rebuilds the website and publishes the Python package to PyPI)
Create the tag through a GitHub release, with the NEWS.md section of this version without its # AMR X.Y.Z heading as release notes:
awk 'NR==1 {next} /^# AMR /{exit} 1' NEWS.md > notes.md
gh release create vX.Y.Z --target main --title "AMR vX.Y.Z" --notes-file notes.md --latest
rm notes.md
git fetch --tags and check that vX.Y.Z points at the release commit
Check that the workflow Publish release reference (.github/workflows/website-release.yaml), which publishing the GitHub release starts, succeeded. It publishes the reference of this version as Markdown at https://amr-for-r.org/release/X.Y.Z/ for the AMR for R Assistant (https://amr-for-r.org/articles/chat.html ), and adds the version to https://amr-for-r.org/release/llms.txt. To publish a version manually, start the workflow from the Actions tab with the tag as input, one version at a time: it shares the concurrency group gh-pages with the website workflow, and GitHub keeps only one waiting run per group, so a second waiting run cancels the first
Run source("data-raw/microorganisms_files/build_mo_code_registry.R") from the root of the repository (takes a few minutes; the tag must exist), then review the diff of mo_code_registry.csv: only new codes may be added, existing codes may only get a later last_release, and renamed codes must have their old name in previous_names (see data-raw/microorganisms_files/README.md)
.github/ISSUE_TEMPLATE/1-bug-report.yml: set the versions to Latest CRAN version (X.Y.Z) and One of the latest GitHub versions (X.Y.Z.9xxx)
NEWS.md: put a new line 1 # AMR X.Y.Z.9001, followed by an empty line, above # AMR X.Y.Z; without this, the hook overwrites the heading of the released section
Commit with the hooks active (the version becomes X.Y.Z.9001) and push to main
Check that the GitHub Actions succeed, the website (https://amr-for-r.org ) shows the new version, and the package is available on PyPI
Check the CRAN page (https://cran.r-project.org/package=AMR ) and the CRAN check results some days later