Skip to content

Releasing

The package is versioned with Changesets and published to GitHub Packages by a GitHub Actions workflow that is started by hand.

In the pull request that changes the library:

Terminal window
pnpm changeset

Pick the bump and write one or two sentences for the changelog. They are read by the people upgrading, so say what changed for them.

Bump When
patch A bug fix or a visual correction that needs no change in apps.
minor A new component, prop, variant, icon or token.
major A removed or renamed component, prop, token or CSS class; a changed default.

While the version is below 1.0, breaking changes go out as minor. Say so clearly in the changeset, as the 0.3.0 entry for the rename to Sulmu UI does.

There are two ways to turn changesets into a release. Both end with the Release workflow.

This is how the releases so far were made.

  1. On main, with a clean working tree, apply the changesets:

    Terminal window
    pnpm changeset version

    This bumps version in package.json, writes CHANGELOG.md and deletes the changeset files.

  2. Commit and push to main:

    Terminal window
    git commit -am "Release 0.4.0"
    Terminal window
    git push
  3. On GitHub, open Actions, choose Release, and press Run workflow on main. With no changesets left, the workflow builds the package and publishes the new version.

B. Let the workflow open the version pull request

Section titled “B. Let the workflow open the version pull request”
  1. Merge pull requests that contain changesets into main.

  2. Run the Release workflow. Because changesets exist, it opens a pull request called “Version Packages” with the version bump and the changelog.

  3. Review and merge that pull request.

  4. Run the Release workflow again. This time it publishes.

.github/workflows/release.yml runs only on workflow_dispatch. It installs with the frozen lockfile on the Node version in .nvmrc, then runs changesets/action with publish: pnpm release, which is pnpm build && changeset publish. It authenticates to GitHub Packages with the workflow’s own GITHUB_TOKEN, so no secret has to be created.

What gets published is set by files in package.json: dist, tokens, icons/svg and illustrations. The docs folder and Storybook are not part of the package.

  • Check the new version on the repository’s Packages page.
  • Upgrade the apps: yarn up @beyul/sulmu-ui in the frontend, then run its tests.
  • This site is built from main, so it shows the released components once Vercel has finished the deployment for that commit.