Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 0 additions & 4 deletions .depcheckrc.yaml

This file was deleted.

13 changes: 13 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
version: 2
updates:
- package-ecosystem: npm
directory: /
schedule:
interval: monthly
groups:
dependencies:
patterns: ['*']
- package-ecosystem: github-actions
directory: /
schedule:
interval: monthly
72 changes: 40 additions & 32 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,52 +7,64 @@ on:
jobs:
checks:
name: Run checks
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
strategy:
matrix:
script:
- lint
- depcheck
- typecheck
script: [lint, typecheck, test]
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v3
uses: actions/checkout@v5
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
version: 8
- name: Setup Node.js
uses: actions/setup-node@v4
bun-version-file: package.json
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Run ${{ matrix.script }}
run: bun run ${{ matrix.script }}

dist:
name: Check dist is up to date
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
node-version: 20
cache: pnpm
bun-version-file: package.json
- name: Install dependencies
shell: bash
run: pnpm install --frozen-lockfile
- name: Run the script
run: pnpm run ${{ matrix.script }}
run: bun install --frozen-lockfile
- name: Build
run: bun run build
- name: Verify dist/ matches the committed bundle
run: git diff --exit-code -- dist/

integration:
name: Test Sentry Integration
strategy:
matrix:
os:
- ubuntu-20.04
- ubuntu-22.04
- macos-11
- macos-12
- windows-2019
- ubuntu-24.04
- ubuntu-24.04-arm
- macos-15-intel # darwin-x64
- macos-15 # darwin-arm64
- macos-26 # darwin-arm64
- windows-2022
version: [latest, 1.58.0]
- windows-2025
- windows-11-arm
version: [latest, 2.46.0]
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Install Sentry CLI
id: sentry
uses: ./
with:
version: ${{ matrix.version }}
Expand All @@ -62,26 +74,22 @@ jobs:
project: ${{ secrets.SENTRY_PROJECT }}
- name: Display Sentry CLI info
run: |
sentry-cli --help
echo "Installed at: ${{ steps.sentry.outputs.sentry-cli-path }}"
sentry-cli --version
sentry-cli info
- name: Deploy Sentry release
if: matrix.os == 'ubuntu-20.04' && matrix.version == 'latest' # do not duplicate releases
if: matrix.os == 'ubuntu-24.04' && matrix.version == 'latest' # do not duplicate releases
run: |
VERSION=$(sentry-cli releases propose-version)
sentry-cli releases new "$VERSION"
sentry-cli releases set-commits "$VERSION" --auto || true
sentry-cli releases files "$VERSION" upload-sourcemaps ./dist \
--rewrite \
--ext map \
--validate \
--verbose \
--strip-common-prefix
sentry-cli sourcemaps upload --release "$VERSION" --strip-common-prefix ./dist
sentry-cli releases finalize "$VERSION"
- name: Send Sentry test event
if: "!contains(matrix.os, 'win')"
run: |
sentry-cli send-event \
--release="$VERSION" \
--release="$(sentry-cli releases propose-version)" \
--fingerprint="GH-DEMO" \
--message="Hello from GitHub Actions" \
--level=debug
Expand Down
5 changes: 0 additions & 5 deletions .standard-commitrc.json

This file was deleted.

17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
# Changelog

## [Version 3.0.0](https://github.com/matbour/setup-sentry-cli/releases/tag/v3.0.0)

**Breaking:** the action now runs on the `node24` runtime. It requires GitHub-hosted runners or a self-hosted
[actions/runner](https://github.com/actions/runner) >= 2.327.1. Node.js 20 actions are deprecated by GitHub and are
forced onto Node.js 24 since June 2nd, 2026.

- **feat**(github): upgrade runtime to `node24` (fixes [#23](https://github.com/matbour/setup-sentry-cli/issues/23))
- **feat**(arch): add support for Windows arm64 ([#24](https://github.com/matbour/setup-sentry-cli/pull/24)), thanks to @advait-m!
- **feat**(outputs): expose the installed executable path as the `sentry-cli-path` output
- **fix**(arch): 32-bit Linux and Windows mappings never matched (Node.js reports `ia32`, not `x32`)
- **fix**(secrets): mask the token before exporting `SENTRY_AUTH_TOKEN`
- **build**(\*): use [Bun](https://bun.sh) for dependency management, bundling and testing (replaces pnpm and tsup)
- **test**(\*): add unit tests for the download link resolution and the environment configuration
- **chore**(deps): upgrade `@actions/core` to v3 and `@actions/tool-cache` to v4, drop `@actions/io`
- **chore**(biome): upgrade Biome to v2
- **ci**(actions): refresh the runner matrix (Ubuntu 22.04/24.04 x64 and arm64, macOS 15 Intel, macOS 15/26 arm64, Windows 2022/2025, Windows 11 arm64), add a `dist/` freshness check and Dependabot

## [Version 2.0.0](https://github.com/mathieu-bour/setup-sentry-cli/releases/tag/v2.0.0)

- **feat**(github): upgrade runtime to `node20` and dependencies (fixes [#20](https://github.com/mathieu-bour/setup-sentry-cli/issues/20))
Expand Down
73 changes: 51 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ There are also some [Docker-based actions][2.2], but they are quite slow.

## Usage

### Requirements

Since v3, this action runs on the `node24` runtime. GitHub-hosted runners support it out of the box; self-hosted runners
need [actions/runner](https://github.com/actions/runner) 2.327.1 or newer. If you cannot upgrade your runners yet, stay
on `matbour/setup-sentry-cli@v2` (`node20`), which is no longer maintained.

### Supported operating systems

This action currently supports Ubuntu, Windows and Mac-OS based systems. The supported operating system matrix is the
Expand All @@ -42,7 +48,7 @@ following:
| `macos-latest` | ![supported] |
| `windows-latest` | ![supported] |

This action also support ARM-based systems (armv7 and arm64), thanks to @paresy support.
This action also supports ARM-based systems (armv7 and arm64), thanks to @paresy and @advait-m.

| Platform | Architecture | Status |
| -------- | --------------- | ------------ |
Expand All @@ -68,6 +74,12 @@ This action also support ARM-based systems (armv7 and arm64), thanks to @paresy

See [action.yml](action.yml) for details.

### Outputs

| Name | Description |
| ----------------- | ---------------------------------------------------- |
| `sentry-cli-path` | Absolute path to the installed sentry-cli executable |

#### `version`

If you need a precise version of the Sentry CLI, you may provide this input. We strongly advise you to do so since using
Expand All @@ -84,26 +96,16 @@ which is
This is the token which will be used by the Sentry CLI to authenticate against the Sentry server. Actually, this will
export the `SENTRY_AUTH_TOKEN` environment variable, so the sentry-cli already can log into the server.

##### Organization Internal Integration (recommended)

This will generate a token that is tied to your organization. Go to Organization Settings > Developer Settings > + New
Internal Integration. Fill the `Name` with a name of your choice (for example `GitHub Actions`); you will get a token
that you can use a Sentry token.
##### Organization auth token (recommended)

If you plan to use this action to deploy releases, set the following permissions:

| Name | Access |
| ------------- | --------- |
| Project | No Access |
| Release | Admin |
| Issue & Event | No Access |
| Organization | Read |
| Member | No Access |
Sentry recommends [organization auth tokens](https://docs.sentry.io/account/auth-tokens/#organization-auth-tokens) for
CI: they are tied to your organization rather than a user, and are scoped to exactly what is needed to upload source
maps and manage releases. Go to Organization Settings > Auth Tokens > Create New Token, then store it in a GitHub secret.

##### Personal token

You can also create personal access token that are tied to your account and use them to impersonate your account. Simply
go to Settings > API Keys > Create Next Token.
You can also create a [user auth token](https://docs.sentry.io/account/auth-tokens/#user-auth-tokens) tied to your
account: Settings > Auth Tokens > Create New Token. Prefer organization tokens for anything shared or long-lived.

#### `organization`

Expand All @@ -118,7 +120,7 @@ Define the default project; this will export the `SENTRY_PROJECT` environment va
### Minimal configuration

```yaml
- uses: matbour/setup-sentry-cli@v2 # WARNING: see the latest stable version instead!
- uses: matbour/setup-sentry-cli@v3
```

By default, this minimal example will install the latest version of the Sentry CLI, without any authentication.
Expand All @@ -127,11 +129,11 @@ By default, this minimal example will install the latest version of the Sentry C

```yaml
- name: Setup Sentry CLI
uses: matbour/setup-sentry-cli@v1
uses: matbour/setup-sentry-cli@v3
with:
version: latest # optional if 'latest'
version: 2.46.0 # optional, defaults to 'latest'
url: https://sentry.yourcompany.com # optional if you are using https://sentry.io
token: ${{ SECRETS.SENTRY_TOKEN }} # from GitHub secrets
token: ${{ secrets.SENTRY_TOKEN }} # from GitHub secrets
organization: my-org
project: my-project
```
Expand All @@ -144,11 +146,38 @@ organization `my-org`.

You are now ready to use the Sentry CLI commands such as `sentry-cli releases`!

### Using the output

```yaml
- name: Setup Sentry CLI
id: sentry
uses: matbour/setup-sentry-cli@v3
- run: echo "sentry-cli installed at ${{ steps.sentry.outputs.sentry-cli-path }}"
```

## Migrating from v2

- The runtime moved from `node20` to `node24`; make sure your self-hosted runners are up to date.
- Inputs are unchanged. A new `sentry-cli-path` output is available.
- Windows arm64 is now supported.

## Development

This repository uses [Bun](https://bun.sh):

```sh
bun install
bun test
bun run lint
bun run typecheck
bun run build # regenerates dist/, which is committed
```

[@matbour]: https://github.com/matbour
[@mathrix-education]: https://github.com/mathrix-education
[actions-secrets]: https://help.github.com/en/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets
[license]: https://img.shields.io/github/license/matbour/setup-sentry-cli?style=flat-square
[stars]: https://img.shields.io/github/stars/matbour/setup-sentry-cli?style=flat-square
[latest-release]: https://img.shields.io/github/v/release/matbour/setup-sentry-cli?label=latest%20release&style=flat-square
[workflow]: https://img.shields.io/github/workflow/status/matbour/setup-sentry-cli/Tests?style=flat-square
[workflow]: https://img.shields.io/github/actions/workflow/status/matbour/setup-sentry-cli/tests.yml?branch=main&style=flat-square
[supported]: https://img.shields.io/badge/status-supported-brightgreen?style=flat-square
17 changes: 10 additions & 7 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,29 @@
name: Setup Sentry CLI
description: Setup the Sentry CLI
description: Install the Sentry CLI in your GitHub Actions workflow and configure the SENTRY_* environment variables.
author: Mathieu Bour
branding:
color: orange
icon: triangle
runs:
using: node20
using: node24
main: dist/main.js
inputs:
version:
description: Sentry CLI version to use. By default, the action will use the latest one.
description: Sentry CLI version to install (e.g. `2.46.0`). Defaults to the latest release.
required: false
default: latest
token:
description: Authentication token to use. If not provided, you will have to authenticate yourself later.
description: Sentry authentication token, exported as `SENTRY_AUTH_TOKEN`. If omitted, sentry-cli is left unauthenticated.
required: false
url:
description: Sentry server URL. By default, sentry-cli will use https://sentry.io.
description: Sentry server URL, exported as `SENTRY_URL`. Defaults to https://sentry.io.
required: false
organization:
description: Default Sentry organization.
description: Default Sentry organization slug, exported as `SENTRY_ORG`.
required: false
project:
description: Default Sentry project.
description: Default Sentry project slug, exported as `SENTRY_PROJECT`.
required: false
outputs:
sentry-cli-path:
description: Absolute path to the installed sentry-cli executable.
24 changes: 8 additions & 16 deletions biome.json
Original file line number Diff line number Diff line change
@@ -1,35 +1,27 @@
{
"$schema": "https://biomejs.dev/schemas/1.5.3/schema.json",
"$schema": "https://biomejs.dev/schemas/2.5.10/schema.json",
"files": {
"includes": ["**", "!dist"]
},
"formatter": {
"indentStyle": "space",
"indentWidth": 2,
"lineWidth": 120,
"ignore": ["**/dist/**"]
},
"organizeImports": {
"enabled": true
"lineWidth": 120
},
"assist": { "actions": { "source": { "organizeImports": "on" } } },
"javascript": {
"parser": {
"unsafeParameterDecoratorsEnabled": true
},
"formatter": {
"quoteStyle": "single"
}
},
"linter": {
"enabled": true,
"ignore": ["**/dist/**"],
"rules": {
"recommended": true,
"preset": "recommended",
"complexity": {
"useLiteralKeys": "off"
},
"suspicious": {
"noEmptyInterface": "off",
"noRedeclare": "off"
},
"nursery": {
"correctness": {
"noUnusedImports": "error"
}
}
Expand Down
Loading