Skip to content

Conversation

@betegon
Copy link
Member

@betegon betegon commented Jan 7, 2026

This PR migrates our release management from Changesets to Craft, Sentry's release tool.

Why Craft?

  • No changeset files: No need to create/commit .changeset/*.md files for each PR
  • Auto-versioning: Version bumps determined automatically from conventional commits
  • Better changelogs: Auto-generated with scope grouping and category organization
  • PR previews: Changelog preview comments on every PR
  • Simpler workflow: All release info lives in commit messages, not extra files

Changes

Removed

  • @changesets/cli and @svitejs/changesets-changelog-github-compact dependencies
  • changeset:* scripts from root package.json
  • prepare-publish.yml workflow

Added

  • .craft.yml - Craft configuration with auto versioning and npm/github targets
  • scripts/bump-version.sh - Version bump script called by Craft
  • .github/release.yml - Changelog categories for conventional commits
  • .github/workflows/release.yml - Craft release workflow
  • .github/workflows/changelog-preview.yml - PR changelog previews
    Updated
  • .github/workflows/build.yml - Trigger on release/** branches
  • .github/workflows/publish.yml - Trigger on changelog changes instead of changeset commit messages
  • Contributor docs updated to explain conventional commits

New Release Flow

  1. Contributors use conventional commits (feat:, fix:, docs:, etc.)
  2. PRs show automatic changelog preview comments
  3. Maintainer triggers "Release" workflow → Craft creates release branch
  4. After merge, publish workflow handles NPM, Docker, and Electron releases

Tested locally:
Screenshot 2026-01-07 at 14 39 55

- Remove @changesets/cli and @svitejs/changesets-changelog-github-compact
- Remove changeset:add, changeset:consume, changeset:publish scripts
- Delete prepare-publish.yml workflow
- Add .craft.yml with auto versioning and changelog generation
- Add scripts/bump-version.sh to update package versions
- Add .github/release.yml for conventional commit changelog categories

Craft will automatically determine version bumps from conventional
commits (feat: → minor, fix: → patch, feat!: → major).
- Update build.yml to trigger on release/** branches
- Add release.yml using Craft's reusable release workflow
- Update publish.yml to trigger on changelog changes
- Add changelog-preview.yml for PR changelog comments
- Update changesets.mdx to explain conventional commits
- Update releases.mdx to document new Craft release process
@vercel
Copy link

vercel bot commented Jan 7, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Review Updated (UTC)
spotlightjs Skipped Skipped Jan 12, 2026 6:27pm

@github-actions
Copy link
Contributor

github-actions bot commented Jan 7, 2026

Semver Impact of This PR

🟢 Patch (bug fixes)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


New Features ✨

  • Added a dynamic header for dragbar by MathurAditya724 in #1223
  • Better error message display by MathurAditya724 in #1222

Bug Fixes 🐛

Ui

  • Add validation guards to WebVitalsDetail to prevent crashes by BYK in #1243
  • Handle null/undefined span.description safely by BYK in #1239

Other

  • (sentry) Upload and use source maps for all build targets by BYK in #1241
  • Improve EADDRINUSE error handling and UX by BYK in #1240
  • Updated react-router-dom version to latest by MathurAditya724 in #1245
  • Add error handling for base64 decode operations by BYK in #1237
  • Silence non-fixable Sentry errors by BYK in #1242
  • Add null safety to WebVitals comparators by BYK in #1238
  • Add null check for itemHeader in processEnvelope by BYK in #1233
  • Shiki theme in light mode by MathurAditya724 in #1230

Documentation 📚

Website

  • Add feedback note for Spotlight SDK in documentation by MathurAditya724 in #1228
  • Add NextJS guide by betegon in #1129

Other

  • Add section for the spotlight sdk by MathurAditya724 in #1227

Build / dependencies / internal 🔧

Release

  • Migrate to Craft by betegon in #1232
  • Migrate to Craft by betegon in #1232

Other

  • (deps) Bump @modelcontextprotocol/sdk from 1.24.3 to 1.25.2 by dependabot in #1234
  • Add workflow to notify issues on release by betegon in #1236
  • Using the param instead of calling a function by MathurAditya724 in #1224

Other

  • Node 24.x support by BYK in #1235
  • Vite windows deny bypass by BYK in #1229
  • Qs security vulnerability fix by BYK in #1226
  • Dependency security updates by BYK in #1225
  • Event origin badges ui by BYK in #1221

🤖 This preview updates automatically when you update the PR.

Comment on lines +13 to +15
name: Preview Changelog
uses: getsentry/craft/.github/workflows/changelog-preview.yml@v2
secrets: inherit

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}

Copilot Autofix

AI 6 days ago

To fix the problem, add an explicit permissions block that restricts the default GITHUB_TOKEN access for this workflow. Because this workflow is only orchestrating a reusable workflow and does not itself perform any direct repository mutations, a safe and conservative default is contents: read. This adheres to the principle of least privilege while still allowing typical read operations (like fetching code) if needed by the reusable workflow.

The best way to fix this without changing existing functionality is:

  • Add a permissions block at the root level of .github/workflows/changelog-preview.yml, alongside name and on, so that it applies to all jobs in the workflow (including the changelog-preview job).
  • Set contents: read as the minimal permission. If the reusable workflow needs additional scopes (for example, pull-requests: write), those should be added there, but we will not assume extra needs beyond contents: read since we cannot see the implementation of the reusable workflow and we must avoid altering behavior more than necessary.

Concretely:

  • In .github/workflows/changelog-preview.yml, after the name: Changelog Preview line, insert:
permissions:
  contents: read

No imports or additional methods are required, as this is a YAML configuration change only.

Suggested changeset 1
.github/workflows/changelog-preview.yml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/changelog-preview.yml b/.github/workflows/changelog-preview.yml
--- a/.github/workflows/changelog-preview.yml
+++ b/.github/workflows/changelog-preview.yml
@@ -3,6 +3,8 @@
 # https://getsentry.github.io/craft/
 
 name: Changelog Preview
+permissions:
+  contents: read
 on:
   pull_request:
     types: [opened, synchronize, reopened, edited, labeled, unlabeled]
EOF
@@ -3,6 +3,8 @@
# https://getsentry.github.io/craft/

name: Changelog Preview
permissions:
contents: read
on:
pull_request:
types: [opened, synchronize, reopened, edited, labeled, unlabeled]
Copilot is powered by AI and may make mistakes. Always verify output.
@betegon betegon marked this pull request as draft January 7, 2026 13:26
- Update .craft.yml with proper npm and github targets
- Simplify publish.yml to only handle Docker and Electron
- NPM publishing and GitHub releases now handled by getsentry/publish
- Trigger post-release workflow on release:published event

The release flow is now:
1. release.yml -> craft prepare -> creates publish issue
2. getsentry/publish -> craft publish -> npm + GitHub release
3. publish.yml -> Docker tagging + Electron signing
Copy link
Member

@BYK BYK left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Follow up:

  1. Also remove that annoying PR template please
  2. Me to do NPM org/token shenenigans

Explains how the Craft + getsentry/publish release flow works,
including the Post-Release workflow for Docker and Electron.
- Introduced a new GitHub Actions workflow for building the Electron app on macOS.
- Added steps for setting up dependencies, downloading the Electron build, and validating the build files.
- Implemented storage of Electron binaries as artifacts for future use.
- Updated the .craft.yml to include tagging for Electron binaries in the release process.
- Removed the obsolete post-release workflow file.
@betegon betegon requested a review from BYK January 12, 2026 11:43
Copy link
Member

@BYK BYK left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 minor things

@BYK BYK deployed to Preview January 12, 2026 14:19 — with GitHub Actions Active
name: github
config:
contexts:
- "Build"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Status context mismatch may prevent Craft release

Medium Severity

The statusProvider.contexts configuration specifies "Build" as the required status context. However, GitHub Actions status checks are typically named using the format {workflow-name} / {job-name}. Since the workflow is named "Build & Test" and the job is named "Build", the actual status check context will be "Build & Test / Build". If Craft requires an exact match, it won't detect when the build completes, potentially blocking releases. The context should likely be "Build & Test / Build" or use a pattern that matches the full status check name.

Fix in Cursor Fix in Web

with:
version: ${{ inputs.version }}
force: ${{ inputs.force }}
merge_target: ${{ inputs.merge_target }}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Release workflow missing pnpm setup for version script

High Severity

The release workflow invokes the Craft action which runs preReleaseCommand: bash scripts/bump-version.sh. This script uses pnpm version to update the package version. However, the workflow doesn't include pnpm/action-setup or actions/setup-node steps before calling Craft. GitHub-hosted runners don't have pnpm pre-installed, so the pnpm version command will fail with "command not found", causing releases to fail.

Additional Locations (1)

Fix in Cursor Fix in Web

@betegon betegon merged commit 142bca3 into main Jan 12, 2026
22 checks passed
@betegon betegon deleted the feat/migrate-to-craft branch January 12, 2026 18:35
with:
version: ${{ inputs.version }}
force: ${{ inputs.force }}
merge_target: ${{ inputs.merge_target }}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Release workflow missing pnpm setup for version bump

High Severity

The release.yml workflow invokes Craft which runs preReleaseCommand: bash scripts/bump-version.sh, but the workflow doesn't set up pnpm before running Craft. The bump-version.sh script executes pnpm version on line 19, which will fail because pnpm is not pre-installed on GitHub Actions runners. The build.yml workflow correctly uses pnpm/action-setup@v4 before any pnpm commands, but this setup step is missing from release.yml. This will cause all releases to fail with "pnpm: command not found".

Additional Locations (1)

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants