Skip to content

Latest commit

 

History

History
222 lines (171 loc) · 4.81 KB

github-releases.md

File metadata and controls

222 lines (171 loc) · 4.81 KB

GitHub Releases

@releasekit/publish creates a GitHub Release for each published package. This guide covers configuration options and how to use LLM-generated prose as the release body.

Enabling GitHub Releases

GitHub Releases are enabled by default. Requires GITHUB_TOKEN with contents: write permission.

{
  "publish": {
    "githubRelease": {
      "enabled": true
    }
  }
}

To disable:

{
  "publish": {
    "githubRelease": { "enabled": false }
  }
}

Release Body (body)

Controls what appears in the GitHub Release description.

Value Behaviour
"auto" (default) Use LLM release notes if available, otherwise changelog entries, otherwise GitHub auto-generated notes
"releaseNotes" Use LLM-generated prose release notes (requires notes.releaseNotes.llm.tasks.releaseNotes: true)
"changelog" Use the formatted changelog entries for this version
"generated" GitHub's auto-generated release notes (from merged PRs and commits)
"none" No release body
{
  "publish": {
    "githubRelease": {
      "body": "releaseNotes"
    }
  }
}

Using LLM-Generated Release Notes

To populate the GitHub Release body with LLM-written prose:

1. Enable the releaseNotes LLM task in notes config:

{
  "notes": {
    "releaseNotes": {
      "llm": {
        "provider": "openai",
        "model": "<your-model>",
        "tasks": { "releaseNotes": true }
      }
    }
  },
  "publish": {
    "githubRelease": {
      "body": "releaseNotes"
    }
  }
}

The notes step runs first, the LLM generates prose release notes, and the publish step forwards them to the GitHub Release API.

If body is "auto" (default), LLM release notes are used automatically when available — no extra config needed.

2. Optionally write release notes to in-repo files as well:

{
  "notes": {
    "releaseNotes": {
      "file": { "dir": "release-notes" },
      "llm": {
        "provider": "anthropic",
        "model": "<your-model>",
        "tasks": { "releaseNotes": true }
      }
    }
  }
}

When file.dir is set, an immutable per-version file is written under that directory (release-notes/<package>/<version>.md in a monorepo) in addition to the GitHub Release being populated.


Draft Releases

Releases are created as drafts by default, giving you a chance to review before publishing.

{
  "publish": {
    "githubRelease": {
      "draft": true
    }
  }
}

Set "draft": false to publish releases immediately.


Prerelease Marking

{
  "publish": {
    "githubRelease": {
      "prerelease": "auto"
    }
  }
}
Value Behaviour
"auto" (default) Marked as prerelease when the version contains a prerelease identifier (e.g. 1.0.0-beta.1)
true Always marked as prerelease
false Never marked as prerelease

Release Title (titleTemplate)

Controls the title of each GitHub Release when a package name is resolved from the tag.

{
  "publish": {
    "githubRelease": {
      "titleTemplate": "${packageName}: ${version}"
    }
  }
}
Variable Value
${packageName} Original scoped package name, e.g. @scope/pkg
${version} The package's new version, with a v when its tag has one, e.g. v1.0.0

The default produces titles like @releasekit/version: v1.0.0. Tags without a package name, e.g. v1.0.0 or release-1.0.0, are used as the title unchanged.


Per-Package Releases

In a monorepo, a separate GitHub Release is created for each published package by default.

{
  "publish": {
    "githubRelease": {
      "perPackage": true
    }
  }
}

Set "perPackage": false to create a single release for the entire repo.


Excluding Packages from GitHub Releases

Use skipPackages to suppress GitHub Release creation for specific packages while still running the full release process (version bump, commit, tag, npm publish) for them. This is useful for internal or utility packages that shouldn't appear in the GitHub Releases UI.

{
  "publish": {
    "githubRelease": {
      "skipPackages": ["@my-org/internal-utils", "@my-org/build-tools"]
    }
  }
}

The name as tags spell it also works, e.g. my-org-internal-utils for @my-org/internal-utils.

Tags are still created for skipped packages — this is required so that changelog range detection works correctly on the next release.


Full Configuration Reference

{
  "publish": {
    "githubRelease": {
      "enabled": true,
      "draft": true,
      "prerelease": "auto",
      "perPackage": true,
      "body": "auto",
      "titleTemplate": "${packageName}: ${version}",
      "skipPackages": []
    }
  }
}

See the @releasekit/publish README for all options.