> ## Documentation Index
> Fetch the complete documentation index at: https://docs.automate.ax/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Automate.ax automations are TypeScript programs.
> Use Bun for installation and command examples.
> Use Automate.ax for the product name and automate.ax for the package, CLI, and domain.
> Treat documented public APIs as current; do not invent transitional or deprecated names.

# Update GitHub release

> Update a GitHub release's notes or publication state.

`github.updateRelease` changes an existing release.

```ts automations/publish-github-release.automation.ts theme={null}
import { automation } from "automate.ax"
import { github } from "automate.ax/github"

export default automation("Publish GitHub release", () => {
  github.updateRelease({
    draft: false,
    owner: "SentsCo",
    releaseId: 123456,
    repository: "automate.ax",
  })
})
```

Provide the repository and `releaseId`. Optional replacements are `tagName`, `targetCommitish`, `name`, Markdown `body`, `draft`, `prerelease`, `discussionCategoryName`, and `makeLatest`. GitHub only supports generated notes when creating a release. Returns the release's `id`, `tag_name`, `draft`, and `prerelease` state. Publishing a draft or changing prerelease state can emit different release webhook actions. Requires Contents write permission. GitHub also requires Workflows write permission when the target commit changes a file under `.github/workflows/` relative to the default branch.
