InTouch Hub · Blue Isle Software

GitHub Release

Cut GitHub releases and attach files to them — create, update and delete releases, upload or remove download assets. Needs an API Key credential holding a personal access token.

Provided free and as is, without warranty of any kind — including merchantability, fitness for a particular purpose, and the accuracy or completeness of any result. See the licence. You are responsible for checking what this produces before relying on it.

developer-devopsdevopsgitgithubreleaseversioningartifactsdownloads

GitHub Release

Cut releases on GitHub and attach the files people download — Releases API. This is how a build reaches users: a tag, release notes, and the binaries hanging off them.

Part of the GitHub family: github (issues and pull requests), github-publish (files in the repository), github-repo (repository administration), github-insights (traffic and popularity).

Use case

A workflow builds an installer and the installer has to reach users. Committing it is not an option — the Contents API caps a file at 1 MB. A release asset has no such limit, and it gives you a stable download URL, a version number and notes in one place.

Setup

  1. Create a personal access token at https://github.com/settings/tokens with Contents: read and write on the target repositories (releases live under the Contents permission, not a separate one). A classic token needs repo.
  2. Store it once: Credentials → New → API Key, name it (e.g. github-blueisle), paste the token.
  3. Name that credential on every github-release task.

Operations

operation what it does required
create-release create a release, tagging a commit if the tag is new owner, repo, tag
list-releases releases newest first owner, repo
get-release one release by tag or releaseId; neither = the latest owner, repo
update-release change the title, notes, draft or prerelease flag owner, repo, tag or releaseId, plus a field
delete-release remove a release owner, repo, tag or releaseId
list-assets files attached to a release, with their ids and sizes owner, repo, tag or releaseId
upload-asset attach a file from the server to a release owner, repo, tag or releaseId, assetFile
delete-asset remove one attached file owner, repo, assetId

Two hosts, one credential

Release metadata goes to api.github.com. Asset bytes go to uploads.github.com — a different host, and sending an upload to the API host answers 404 with no explanation. The tool handles both; the distinction is documented here because it is the usual reason a hand-rolled version fails.

Drafts have no tag

A draft release does not create its git tag until you publish it — GitHub labels it untagged-<hash> — so GET /releases/tags/{tag} answers 404 for a draft even though the draft carries the tag_name you gave it. Uploading assets to a draft and publishing afterwards is the normal release flow, so the tool falls back to scanning the release list, where drafts do appear. tag therefore addresses a draft and a published release alike.

Memory

GitHub's upload endpoint does not accept chunked transfer, so an asset is read into memory in one go. A 400 MB installer needs 400 MB of headroom in the server process. The step's timeout is 900 seconds for the same reason — a large file over a domestic uplink takes minutes.

Pipeline

  1. run (python, github_release.py) — resolves the token from the bound credential, resolves the release from tag when no releaseId was given, calls the endpoint, publishes the response.

Publishes

Customization

Source

tool.iml (definition) · github_release.py (implementation) · manifest.yaml (catalog entry)

Publishes

The keys a later task may reference as {{taskName.key}}. Referencing anything not listed here resolves to nothing at run time.

Input Properties

Every property this tool accepts, from its own tool.iml.

Property Type Required Default Description
operation string yes One of: create-release, list-releases, get-release, update-release, delete-release, list-assets, upload-asset, delete-asset
owner string yes Repository owner — the user or organisation login, e.g. 'intouch-ai-core'.
repo string yes Repository name, e.g. 'intouch-ai'.
tag string no Git tag for the release, e.g. 'v8.0.5'. Required for create-release; on other operations it identifies which release to act on.
name string no Release title. Defaults to the tag.
draft string no false true to create the release unpublished, so it is invisible until you publish it.
prerelease string no false true to mark it a pre-release rather than the latest stable version.
targetCommitish string no Branch or commit the tag is created from, when the tag does not exist yet. Blank uses the default branch.
releaseId string no Numeric release id, as an alternative to tag. list-releases reports it.
assetFile string no Path ON THE SERVER of the file to attach, for upload-asset. Held in memory during upload.
assetName string no Name the asset is downloaded as. Defaults to the file's own name.
assetId string no Numeric asset id, for delete-asset. list-assets reports it.