Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 15 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,29 @@ Additionally, releases are used for applying [source maps](https://docs.sentry.i

* **feat(sourcemaps): Add inject option to inject debug ids into source files and sourcemaps**

A new option to inject Debug IDs into source files and sourcemaps was added to the action to ensure proper un-minifaction of your stacktraces. We **strongly recommend enabling** this by setting `inject: true` in your action alongside providing a path to sourcemaps.
A new option to inject [Debug IDs](https://docs.sentry.io/platforms/javascript/sourcemaps/troubleshooting_js/artifact-bundles/) into source files and sourcemaps was added to the action to ensure proper un-minifaction of your stacktraces. We **strongly recommend enabling** this by setting `inject: true` in your action alongside providing a path to sourcemaps.


Please refer to the [release page](https://github.com/getsentry/action-release/releases) for the latest release notes.

[Learn more about debug ids](https://docs.sentry.io/platforms/javascript/sourcemaps/troubleshooting_js/artifact-bundles/)
## Prerequisites

### Create an Organization Auth Token

> [!NOTE]
> You have to be an admin in your Sentry org to create this.

For this action to communicate securely with Sentry, you'll need to [create an organization auth token](https://docs.sentry.io/account/auth-tokens/#organization-auth-tokens).
Copy the generated token and use it as your `SENTRY_AUTH_TOKEN`. We recommend storing it as an [encrypted secret](https://docs.github.com/en/actions/security-guides/using-secrets-in-github-actions).


You also need to set your Organization and Project slugs and if you're using a self-hosted Sentry instance, provide the URL used to connect to Sentry via SENTRY_URL.
Copy link
Member

Choose a reason for hiding this comment

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

The organization and Sentry URL are encoded in the org auth token. We recommend that users do not manually set these when they are using an org auth token. Users should only need to set the project slug.

Suggested change
You also need to set your Organization and Project slugs and if you're using a self-hosted Sentry instance, provide the URL used to connect to Sentry via SENTRY_URL.
You also need to set your project slug.

Copy link
Member Author

Choose a reason for hiding this comment

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

Does that hold true for self-hosted too?

Anyway, this isn't a simple docs/readme change as the action has code that depends on these. We can think of removing in another issue. Let's discuss this in our meeting.

Copy link
Member

Choose a reason for hiding this comment

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

Yes, it applies to self hosted (minus, some old self-hosted versions that did not encode the URL due to a bug). Sentry CLI (at least for the URL, not sure about the org) will ignore the manually provided values and use the ones encoded in the token, and it also issues a warning in case of a difference.

The whole point of encoding the URL and org in the token was to eliminate the need to manually specify them, so we should definitely remove any code that depends on these being manually provided from the GitHub action

Copy link
Member Author

Choose a reason for hiding this comment

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

As discussed, let's tackle this in #212

Copy link
Member

Choose a reason for hiding this comment

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

#212 seems to imply we would need to make these changes in a major release, but I think we can make them in a minor release, too

Copy link
Member Author

Choose a reason for hiding this comment

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

We can, but priority wise we want to tackle a new major first.


```bash
SENTRY_AUTH_TOKEN=sntrys_YOUR_TOKEN_HERE
SENTRY_ORG=example-org
SENTRY_PROJECT=example-project
# For self-hosted
# SENTRY_URL=https://my-sentry-url
```

We recommend storing these as [encrypted secrets](https://docs.github.com/en/actions/security-guides/using-secrets-in-github-actions) on your repository.

## Usage

Expand Down
Loading