#What is the best practice for using a commit SHA as a release ID?

2 messages · Page 1 of 1 (latest)

ripe patio
#

We have a React app, and are using Github Actions. What's the preferred method for getting the Git commit SHA into Sentry.init()? I've searched the documentation for an example but haven't been able to find one. Thanks!

glad stream
#

How you make the release name (or version) available to your code is up to you. For example, you could use an environment variable that is set during the build process or during initial start-up.

https://docs.sentry.io/platforms/javascript/guides/react/configuration/releases/

So it's really up to you and what works for you build preference but using a .env might make the most sense and maybe that is something you can incorporate in your build process?