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, replacing an asset of the same name
if the release already carries one. |
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, replacing an asset of the same name
if the release already carries one.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, or if an existing asset of that name could
not be removed first.ensureRelease(java.lang.String, java.lang.String, java.lang.String, java.lang.String) hands back an existing release rather than failing, so
without it publishing one version twice succeeds at the release and then fails at every
asset. A rolling version, such as a snapshot republished on each push, is nothing but that
case.