Tegami

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_TOKEN with permission to create pull requests and releases.

In GitHub Actions, your workflow needs at least:

permissions:
  contents: write
  id-token: write

See CI Setup for a complete workflow example.

Version Packages PR

After tegami version applies a plan in CI, the plugin:

  1. Creates or updates the tegami/version-packages branch.
  2. Commits version and changelog changes.
  3. 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",
  },
});
SettingDefaultDescription
branchtegami/version-packagesHead branch for the version PR
basemainBase branch for the version PR
forceCreatefalseCreate the PR outside CI as well
createOverride 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"),
      };
    },
  },
});
SettingDefaultDescription
eagerfalseCreate releases without waiting for every package in the plan
createOverride release details for a single package
createGroupedOverride release details when multiple packages share one git tag

On this page