Skip to content

Latest commit

 

History

History
72 lines (47 loc) · 2.72 KB

File metadata and controls

72 lines (47 loc) · 2.72 KB

Contributing to Geist Font

Development

Prerequisites

  • Python 3.10
  • Node.js (supported version in .nvmrc, prefer using fnm for installing)
  • pnpm (via corepack)

Building Fonts

make build

This will:

  1. Build font files from source into fonts/
  2. Copy and rename fonts for the npm package into packages/next/dist/fonts/
  3. Create geist-font.zip with all of the fonts neatly packaged together

Release Process

This project uses Changesets to manage versioning and releases. When changes are merged to main, CI will automatically handle npm publishing and GitHub releases.

Adding a Changeset

When making changes that should be released, add a changeset:

cd packages/next
# If you haven't installed dependencies already:
pnpm install
pnpm changeset

You'll be prompted to:

  1. Select the type of change (patch, minor, or major - read more about SemVer at semver.org)
  2. Write a summary of the changes

This creates a markdown file in packages/next/.changeset/ describing your change.

Version Guidelines

  • patch: Bug fixes, font corrections, minor adjustments
  • minor: New font weights, new features, backward-compatible additions
  • major: Breaking changes to the npm package's API or major font structure changes

How Releases Work

  1. On every push: The CI builds fonts and runs tests
  2. On push to main:
    • If there are changeset files, the CI creates a PR titled "changesets: update versions of packages for release"
    • When that PR is merged, the CI publishes to npm (named geist) and creates a GitHub release
    • An additional step attaches a zip file containing only the relevant font files to the GitHub release

Manual Steps

  1. Create a PR with your changes and a changeset file
  2. Get the PR reviewed and merged to main
  3. A PR titled "changesets: update versions of packages for release" will automatically be raised — review and merge it
  4. Upon merging the PR, CI will automatically publish to npm and create the GitHub release

Beta Release

You can run a beta release from any git ref (branch, SHA, or a PR ref) using the "Beta Release" workflow in GitHub Actions. The ref input is required and can be, for example, my-branch, a1b2c3d, or refs/pull/123/head.

The workflow always enters Changesets prerelease mode (beta), versions packages with -beta.X, publishes to npm under the beta dist-tag, and creates a GitHub prerelease with the font zip attached.

Note: beta releases require at least one changeset file in packages/next/.changeset/.