diff --git a/NAMESPACE b/NAMESPACE index 5f875be23..be478ff96 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -14,6 +14,7 @@ export(tag_version) export(unbump_version) export(update_news) export(update_version) +export(use_github_action_pkgcheck) export(with_demo_project) import(cli) import(glue) diff --git a/R/use_github_action_fledge.R b/R/use_github_action_fledge.R new file mode 100644 index 000000000..ba16544cd --- /dev/null +++ b/R/use_github_action_fledge.R @@ -0,0 +1,13 @@ +#' Use fledge GitHub Actions workflow +#' +#' @inheritParams usethis::use_github_action +#' +#' @return Nothing, called for its side-effect. +#' @export +#' +use_github_action_pkgcheck <- function(save_as = NULL) { + usethis::use_github_action( + url = system.file("fledge.yaml", package = "fledge"), + save_as = save_as + ) +} diff --git a/inst/fledge.yaml b/inst/fledge.yaml new file mode 100644 index 000000000..6e4b11874 --- /dev/null +++ b/inst/fledge.yaml @@ -0,0 +1,26 @@ +name: fledge + +on: + # for manual triggers + workflow_dispatch: + # daily run + schedule: + - cron: "30 14 * * *" + +jobs: + pkgcheck: + runs-on: ubuntu-latest + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + steps: + - uses: actions/checkout@v2 + + - uses: r-lib/actions/setup-r@v2 + with: + use-public-rspm: true + + - name: Install fledge + run: Rscript -e 'install.packages("fledge")' + + - name: Bump version + run: Rscript -e 'fledge::bump_version(which = "dev")' diff --git a/man/use_github_action_pkgcheck.Rd b/man/use_github_action_pkgcheck.Rd new file mode 100644 index 000000000..faecaa059 --- /dev/null +++ b/man/use_github_action_pkgcheck.Rd @@ -0,0 +1,20 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/use_github_action_fledge.R +\name{use_github_action_pkgcheck} +\alias{use_github_action_pkgcheck} +\title{Use fledge GitHub Actions workflow} +\usage{ +use_github_action_pkgcheck(save_as = NULL) +} +\arguments{ +\item{save_as}{Name of the local workflow file. Defaults to \code{name} or +\code{fs::path_file(url)} for \code{use_github_action()}. Do not specify any other +part of the path; the parent directory will always be \code{.github/workflows}, +within the active project.} +} +\value{ +Nothing, called for its side-effect. +} +\description{ +Use fledge GitHub Actions workflow +}