Interface Publishing

All Known Implementing Classes:
GitHub

public interface Publishing
Creates GitHub releases and uploads assets to them.
  • Method Summary

    Modifier and Type
    Method
    Description
    ensureRelease(String owner, String repo, String tag, String name)
    Creates a release for tag, or returns the existing release if one already exists for that tag.
    void
    uploadAsset(Release release, File file, String assetName)
    Uploads a file as an asset attached to release.
  • Method Details

    • ensureRelease

      Release ensureRelease(String owner, String repo, String tag, String name)
      Creates a release for tag, or returns the existing release if one already exists for that tag.
      Parameters:
      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.
      Returns:
      the created or pre-existing release, including its asset upload URL.
      Throws:
      RuntimeException - if authentication fails or the GitHub API returns an error.
      RateLimitException - if the GitHub API rate limit has been exceeded.
    • uploadAsset

      void uploadAsset(Release release, File file, String assetName) throws IOException
      Uploads a file as an asset attached to release.
      Parameters:
      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.
      Throws:
      IOException - if the upload request fails.