public interface Publishing
| Modifier and Type | Method and Description |
|---|---|
Release |
ensureRelease(java.lang.String owner,
java.lang.String repo,
java.lang.String tag,
java.lang.String name)
Creates a release for
tag, or returns the existing release if one already exists
for that tag. |
void |
uploadAsset(Release release,
java.io.File file,
java.lang.String assetName)
Uploads a file as an asset attached to
release. |
Release ensureRelease(java.lang.String owner, java.lang.String repo, java.lang.String tag, java.lang.String name)
tag, or returns the existing release if one already exists
for that tag.owner - the GitHub account or organization that owns the repository.repo - the repository name, without the owner prefix.tag - the git tag for the release (GitHub auto-creates a lightweight tag if absent).name - the human-readable release title; if null, defaults to tag.java.lang.RuntimeException - if authentication fails or the GitHub API returns an error.RateLimitException - if the GitHub API rate limit has been exceeded.void uploadAsset(Release release, java.io.File file, java.lang.String assetName) throws java.io.IOException
release.release - the release to attach the asset to, as returned by ensureRelease(java.lang.String, java.lang.String, java.lang.String, java.lang.String).file - the file to upload.assetName - the asset name as it will appear in the release.java.io.IOException - if the upload request fails.