GitHub
Version Packages pull requests and GitHub releases.
The GitHub plugin automates the Changesets-style release flow: open a Version Packages PR after versioning, then create GitHub releases after publish. It includes the git plugin for tag creation.
import { github } from "tegami/plugins/github";
const paper = tegami({
plugins: [
github({
repo: "your-org/your-repo",
}),
],
});Requirements
GITHUB_TOKENwith permission to create pull requests and releases.
In GitHub Actions, your workflow needs at least:
permissions:
contents: write
id-token: writeSee CI Setup for a complete workflow example.
Version Packages PR
After tegami version applies a plan in CI, the plugin:
- Creates or updates the
tegami/version-packagesbranch. - Commits version and changelog changes.
- Opens a pull request against your base branch.
Configure the PR behavior:
github({
repo: "your-org/your-repo",
versionPr: {
branch: "tegami/version-packages",
base: "main",
},
});| Setting | Default | Description |
|---|---|---|
branch | tegami/version-packages | Head branch for the version PR |
base | main | Base branch for the version PR |
forceCreate | false | Create the PR outside CI as well |
create | — | Override the PR title and body before it is sent |
Set versionPr: false to disable PR creation. Set versionPr: { forceCreate: true } to always create the PR, including locally.
GitHub releases
After a successful publish, the plugin creates a GitHub release for each git tag. Release notes come from the changelog sections attached to each package.
For grouped tags (syncGitTag), one release covers all packages in the group.
Set release: false to disable GitHub release creation.
github({
repo: "your-org/your-repo",
release: {
// create a release as soon as a tag succeeds, without waiting for the whole plan
eager: false,
create({ tag, pkg, plan }) {
return {
title: tag,
notes: `Released ${pkg.name}`,
prerelease: false,
};
},
createGrouped({ tag, packages, plan }) {
return {
title: tag,
notes: packages.map((pkg) => pkg.name).join("\n"),
};
},
},
});| Setting | Default | Description |
|---|---|---|
eager | false | Create releases without waiting for every package in the plan |
create | — | Override release details for a single package |
createGrouped | — | Override release details when multiple packages share one git tag |
Tegami