Set up changesets in a GitHub repository

Updated 3 weeks ago

  1. Install @changesets/cli

    yarn add --dev @changesets/cli
    
  2. Initialize changesets

    yarn changeset init
    
  3. Add a release script

    // package.json
    {
      "scripts": {
         "release": "yarn build && changeset publish"
      }
    }
    
  4. Generate an npm token

  5. Add an NPM_TOKEN secret for your repository

  6. Create .github/workflows/release.yml

  7. Install changeset-bot on your repository