Skip to content

Adopt unirelman in an existing project

This guide shows how to add unirelman to a project with published versions, so that it publishes each version once.

On publish, each plugin checks its destination for the current version of each scope, and creates only the releases missing there. See Stateless publishing.

The Git and GitHub plugins look for the tag of each current version: by default, the version for a scope at the repository root (1.0.0), and <scope>@<version> for other scopes (@example/core@1.0.0).

When the existing tags have other names, such as v1.0.0, set the same tagFormat on both plugins:

unirelman.config.ts
import { createGitPlugin, type GitTagFormat } from "@unirelman/plugin-git";
import { createGitHubPlugin } from "@unirelman/plugin-github";
const tagFormat: GitTagFormat = ({ version }) => `v${version}`;
// ...
plugins: [
// ...
createGitPlugin({ tagFormat }),
createGitHubPlugin({ tagFormat }),
],

See Tag names.

  1. Set up unirelman: see Get started.
  2. Record your first change with a changeset.
  3. Run version, then publish: the next versions are the first ones unirelman publishes.

With the GitHub Action, push the workflow with your first changeset. The first run opens a release pull request, and publishing starts once you merge it. See The publish setting.