> ## 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.

# Create GitHub release

> Create a draft, prerelease, or published GitHub release.

`github.createRelease` creates a release and can ask GitHub to generate release notes.

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

export default automation("Create GitHub release", () => {
  github.createRelease({
    generateReleaseNotes: true,
    name: "Automate.ax 2.0",
    owner: "SentsCo",
    repository: "automate.ax",
    tagName: "v2.0.0",
    targetCommitish: "main",
  })
})
```

Provide the repository and `tagName`. Optional fields are `targetCommitish`, `name`, Markdown `body`, `draft`, `prerelease`, `generateReleaseNotes`, `discussionCategoryName`, and `makeLatest` (`"true"`, `"false"`, or `"legacy"`). Draft, prerelease, and generated notes default to `false`. GitHub creates the tag from `targetCommitish` when it does not exist. Returns the release's `id`, `tag_name`, `draft`, and `prerelease` state. 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.
