Description Usage Arguments Details Value Examples
This function creates a new release in the specified repository in GitHub. It must be pointed at a commit by providing an existing tag or a Git reference, which can be either a SHA or branch. If the tag does not exist it is created pointing at the commit; if it does exist then the reference is ignored.
1 2 3 4 5 6 7 8 9 10 |
tag |
(string) The name of the tag. |
repo |
(string) The repository specified in the format: |
name |
(string, optional) The name of the release. |
body |
(string, optional) The description of the release. |
ref |
(string, optional) Either a SHA or branch used to identify the
commit. If the |
draft |
(boolean, optional) Whether the release is a draft. Default:
|
prerelease |
(boolean, optional) Whether the release is a pre-release.
Default: |
... |
Parameters passed to |
For more details see the GitHub API documentation:
create_release()
returns a list of the release's properties.
Release Properties:
id: The id of the release.
tag: The tags associated with the release.
name: The name of the release.
body: The description of the release.
commit: The commit associated with the release.
draft: Whether the release is draft.
prerelease: Whether it is a pre-release.
author_login: The author's account login.
assets: The name of the assets associated with the release.
html_url: The address of the release's web page.
created_at: The time and date the release was created.
published_at: The time and date the release was published.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | ## Not run:
# Create a release on the default branch
create_release(
tag = "1.0.0",
repo = "ChadGoymer/githapi",
name = "Initial production release",
body = "This is a release created by create_release()"
)
# Create a draft pre-release
create_release(
tag = "1.0.9000",
repo = "ChadGoymer/githapi",
name = "Draft 1.1 release",
body = "This is a release created by create_release()",
ref = "dev-branch",
draft = TRUE,
prerelease = TRUE
)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.