NOTE: you must first create a release if one does not already exists.

pb_upload(file, repo = guess_repo(), tag = "latest", name = NULL,
  overwrite = TRUE, use_timestamps = TRUE, show_progress = TRUE,
  .token = get_token(), dir = ".")

Arguments

file

path to file to be uploaded

repo

Repository name in format "owner/repo". Will guess the current repo if not specified.

tag

tag for the GitHub release to which this data should be attached.

name

name for uploaded file. If not provided will use the basename of file (i.e. filename without directory)

overwrite

overwrite any existing file with the same name already attached to the on release? Defaults to TRUE

use_timestamps

logical, if TRUE, then files will only be downloaded if timestamp on GitHub is newer than the local timestamp (if overwrite=TRUE). Defaults to TRUE.

show_progress

logical, show a progress bar be shown for uploading? Defaults to TRUE.

.token

GitHub authentication token. Typically set from an environmental variable, e.g. in a .Renviron file or with Sys.setenv(GITHUB_TOKEN = "xxxxx"), which helps prevent accidental disclosure of a secret token when sharing scripts.

dir

directory relative to which file names should be based.

Examples

# NOT RUN {
# Needs your real token to run

readr::write_tsv(mtcars,"mtcars.tsv.xz")
pb_upload("mtcars.tsv.xz", "cboettig/piggyback-tests")
# }