
Create a GitHub Actions workflow to auto-update R package version
Source:R/42_use_workflow_version_update.R
use_workflow_version_update.RdCopies the built-in version_update.yml workflow template to the target
package's .github/workflows/ directory. The workflow automatically bumps
the R package version based on commit messages, or manually via
workflow_dispatch with a specified version type.
Version bump rules (from commit messages, case-insensitive):
major / breaking - increments the major version (X.0.0)
feat / feature / minor - increments the minor version (x.Y.0)
patch / fix / bug - increments the patch version (x.y.Z)
Otherwise, no version bump occurs
The workflow_dispatch input always overrides commit message detection.
Examples
if (FALSE) { # \dontrun{
temp <- tempdir()
usethis::create_package(temp)
use_workflow_version_update(temp)
use_workflow_version_update(temp, overwrite = TRUE)
} # }