Skip to content

Release: Adds Sentry release creation after publishing to npm#32356

Merged
vanessayuenn merged 4 commits into
nextfrom
vy/sentry-release
Sep 5, 2025
Merged

Release: Adds Sentry release creation after publishing to npm#32356
vanessayuenn merged 4 commits into
nextfrom
vy/sentry-release

Conversation

@vanessayuenn
Copy link
Copy Markdown
Contributor

@vanessayuenn vanessayuenn commented Aug 29, 2025

What I did

Add Sentry release creation after publishing to npm. This helps track releases and errors across different release channels. Ref: Sentry docs

Checklist for Contributors

Testing

The changes in this PR are covered in the following automated tests:

  • stories
  • unit tests
  • integration tests
  • end-to-end tests

Manual testing

This section is mandatory for all contributions. If you believe no manual test is necessary, please state so explicitly. Thanks!

Documentation

  • Add or update documentation reflecting your changes
  • If you are deprecating/removing a feature, make sure to update
    MIGRATION.MD

Checklist for Maintainers

  • When this PR is ready for testing, make sure to add ci:normal, ci:merged or ci:daily GH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found in code/lib/cli-storybook/src/sandbox-templates.ts

  • Make sure this PR contains one of the labels below:

    Available labels
    • bug: Internal changes that fixes incorrect behavior.
    • maintenance: User-facing maintenance tasks.
    • dependencies: Upgrading (sometimes downgrading) dependencies.
    • build: Internal-facing build tooling & test updates. Will not show up in release changelog.
    • cleanup: Minor cleanup style change. Will not show up in release changelog.
    • documentation: Documentation only changes. Will not show up in release changelog.
    • feature request: Introducing a new feature.
    • BREAKING CHANGE: Changes that break compatibility in some way with current major version.
    • other: Changes that don't fit in the above categories.

🦋 Canary release

This PR does not have a canary release associated. You can request a canary release of this pull request by mentioning the @storybookjs/core team here.

core team members can create a canary release here or locally with gh workflow run --repo storybookjs/storybook canary-release-pr.yml --field pr=<PR_NUMBER>

@vanessayuenn vanessayuenn changed the title Adds Sentry release creation after publishing to NPM Release: Adds Sentry release creation after publishing to NPM Aug 29, 2025
@vanessayuenn vanessayuenn changed the title Release: Adds Sentry release creation after publishing to NPM Release: Adds Sentry release creation after publishing to npm Aug 29, 2025
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds automated Sentry release creation after NPM publishing to help track releases and errors across different environments. The integration follows Sentry's recommended GitHub Actions workflow.

  • Adds Sentry release action using sentry/action-release@v2
  • Automatically determines environment based on version suffixes (alpha, beta, rc, or latest)
  • Configures authentication and project settings via GitHub secrets

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread .github/workflows/publish.yml Outdated
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
with:
release: ${{ steps.version.outputs.current-version }}
environment: ${{ contains(steps.version.outputs.current-version, '-alpha') && 'alpha' || contains(steps.version.outputs.current-version, '-beta') && 'beta' || contains(steps.version.outputs.current-version, '-rc') && 'rc' || 'latest' }}
Copy link

Copilot AI Aug 29, 2025

Choose a reason for hiding this comment

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

[nitpick] The environment detection logic is complex and hard to read. Consider using a separate step to set the environment variable or breaking this into multiple conditional steps for better maintainability.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

i agree with this but it's also not logic we're reusing anywhere else.

@ndelangen think it makes sense to split out alpha beta and rc like that? or should we stick with the release tags: just prerelease and latest?

Copy link
Copy Markdown
Member

@ndelangen ndelangen Sep 1, 2025

Choose a reason for hiding this comment

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

We could group all prereleases under a single "prerelease" if you prefer.

It will just take a little change in the server-function reporting to Sentry.
Shall I make that change?, mind you that will not change any events currently already in Sentry.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

yes let's do that. i will update this PR to only have prereleas and latest

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The change to the event-log function is made.

Copy link
Copy Markdown
Contributor

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

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

1 file reviewed, 1 comment

Edit Code Review Bot Settings | Greptile

Comment thread .github/workflows/publish.yml Outdated
@nx-cloud
Copy link
Copy Markdown

nx-cloud Bot commented Aug 29, 2025

View your CI Pipeline Execution ↗ for commit f7b9fea

Command Status Duration Result
nx run-many -t build --parallel=3 ✅ Succeeded 42s View ↗

☁️ Nx Cloud last updated this comment at 2025-09-01 13:05:54 UTC

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
@vanessayuenn vanessayuenn added the build Internal-facing build tooling & test updates label Aug 29, 2025
@vanessayuenn vanessayuenn merged commit e3b728d into next Sep 5, 2025
55 checks passed
@vanessayuenn vanessayuenn deleted the vy/sentry-release branch September 5, 2025 08:56
@github-actions github-actions Bot mentioned this pull request Sep 5, 2025
24 tasks
@vanessayuenn vanessayuenn added the patch:yes Bugfix & documentation PR that need to be picked to main branch label Sep 10, 2025
@github-actions github-actions Bot mentioned this pull request Sep 10, 2025
9 tasks
ndelangen pushed a commit that referenced this pull request Sep 15, 2025
Release: Adds Sentry release creation after publishing to npm
(cherry picked from commit e3b728d)
@github-actions github-actions Bot added the patch:done Patch/release PRs already cherry-picked to main/release branch label Sep 15, 2025
@github-actions github-actions Bot mentioned this pull request Sep 16, 2025
23 tasks
@ndelangen ndelangen removed the patch:yes Bugfix & documentation PR that need to be picked to main branch label Oct 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Internal-facing build tooling & test updates ci:normal patch:done Patch/release PRs already cherry-picked to main/release branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants