Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
8c5d442
feat: Set up Craft-based release workflow for npm and GitHub Releases
BYK Jan 21, 2026
b119aaf
fix: resolve pre-existing lint issues
BYK Jan 21, 2026
0d93907
refactor: merge test into CI workflow with build dependency
BYK Jan 21, 2026
6548c7a
chore: remove debug step from build workflow
BYK Jan 21, 2026
80e3b5f
refactor: consolidate build into CI workflow with caching
BYK Jan 21, 2026
a7fdec8
fix: require SENTRY_CLIENT_ID for build
BYK Jan 21, 2026
b974b53
refactor: flatten repo structure (remove monorepo layout)
BYK Jan 21, 2026
dc89d48
perf: cache node_modules to skip install on cache hit
BYK Jan 21, 2026
e9daa94
chore: target Node.js 22+
BYK Jan 21, 2026
12805aa
Apply suggestion from @BYK
BYK Jan 21, 2026
2dc3bff
test: increase timeouts for E2E tests that call Sentry API
BYK Jan 21, 2026
f7ccade
fix(ci): use cross-compilation for unavailable runners
BYK Jan 21, 2026
4847932
fix(ci): use vars.SENTRY_CLIENT_ID instead of secrets
BYK Jan 21, 2026
0cc6024
fix(ci): support cross-compilation via --target flag
BYK Jan 21, 2026
82cc760
fix(ci): skip smoke test for cross-compiled binaries
BYK Jan 21, 2026
6f96778
refactor(ci): consolidate test workflows
BYK Jan 21, 2026
fad134f
fix(craft): remove invalid cwd references to packages/cli
BYK Jan 21, 2026
0388a5a
fix(test): correct .env.local path after monorepo flatten
BYK Jan 21, 2026
5679e7a
fix(bundle): replace fast-glob with tinyglobby for ESM compatibility
BYK Jan 21, 2026
296c455
fix: add missing tinyglobby import
BYK Jan 21, 2026
ee01df3
fix(polyfill): correct Bun.spawn type signature and stdio mapping
BYK Jan 21, 2026
a367423
fix(test): use delete to clear env vars instead of undefined
BYK Jan 21, 2026
714cdc2
fix(test): use delete for all env var cleanup
BYK Jan 21, 2026
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
15 changes: 15 additions & 0 deletions .craft.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
minVersion: '2.14.0'
changelog:
policy: auto
preReleaseCommand: npm --no-git-tag-version version ${CRAFT_NEW_VERSION}
postReleaseCommand: >-
npm --no-git-tag-version version preminor --preid=dev &&
git diff --quiet || (git commit -anm "meta: Bump new development version

#skip-changelog" && git pull --rebase && git push)
requireNames:
- /^sentry-.+$/
- /^sentry-.*\.tgz$/
targets:
- name: npm
- name: github
13 changes: 13 additions & 0 deletions .github/workflows/changelog-preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Changelog Preview
on:
pull_request_target:
types: [opened, synchronize, reopened, edited, labeled, unlabeled]

permissions:
contents: read
pull-requests: write

jobs:
changelog-preview:
uses: getsentry/craft/.github/workflows/changelog-preview.yml@v2
secrets: inherit
166 changes: 147 additions & 19 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,40 +1,168 @@
name: CI

on:
push:
branches: [main, release/**]
paths:
- 'src/**'
- 'test/**'
- 'script/**'
- 'package.json'
- 'bun.lock'
- '.github/workflows/ci.yml'
pull_request:
paths:
- 'packages/cli/**'
- 'src/**'
- 'test/**'
- 'script/**'
- 'package.json'
- 'bun.lock'
- '.github/workflows/ci.yml'
workflow_call:

concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true

defaults:
run:
working-directory: packages/cli

jobs:
build:
name: Build
lint:
name: Lint & Typecheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup Bun
uses: oven-sh/setup-bun@v2
- uses: oven-sh/setup-bun@v2
- uses: actions/cache@v4
id: cache
with:
bun-version: latest
path: node_modules
key: node-modules-${{ hashFiles('bun.lock') }}
- if: steps.cache.outputs.cache-hit != 'true'
run: bun install --frozen-lockfile
- run: bun run lint
- run: bun run typecheck

- name: Install dependencies
run: bun install

- name: Build (current platform only)
test:
name: Test
runs-on: ubuntu-latest
permissions:
contents: read
actions: read
pull-requests: write
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- uses: actions/cache@v4
id: cache
with:
path: node_modules
key: node-modules-${{ hashFiles('bun.lock') }}
- if: steps.cache.outputs.cache-hit != 'true'
run: bun install --frozen-lockfile
- name: Test
env:
SENTRY_CLIENT_ID: ${{ secrets.SENTRY_CLIENT_ID }}
run: bun run build
SENTRY_TEST_AUTH_TOKEN: ${{ secrets.SENTRY_TEST_AUTH_TOKEN }}
SENTRY_TEST_ORG: ${{ secrets.SENTRY_TEST_ORG }}
SENTRY_TEST_PROJECT: ${{ secrets.SENTRY_TEST_PROJECT }}
run: bun test --coverage --coverage-reporter=lcov
- name: Upload Coverage
uses: getsentry/codecov-action@main
with:
token: ${{ secrets.GITHUB_TOKEN }}
post-pr-comment: true

build-binary:
name: Build Binary (${{ matrix.target }})
needs: [lint, test]
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
# Native builds (can run smoke test)
- target: darwin-arm64
os: macos-latest
can-test: true
- target: linux-x64
os: ubuntu-latest
can-test: true
- target: windows-x64
os: windows-latest
can-test: true
# Cross-compiled builds (cannot run smoke test)
- target: darwin-x64
os: macos-latest
can-test: false
- target: linux-arm64
os: ubuntu-latest
can-test: false
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- uses: actions/cache@v4
id: cache
with:
path: node_modules
key: node-modules-${{ matrix.os }}-${{ hashFiles('bun.lock') }}
- if: steps.cache.outputs.cache-hit != 'true'
run: bun install --frozen-lockfile
- name: Build
env:
SENTRY_CLIENT_ID: ${{ vars.SENTRY_CLIENT_ID }}
run: bun run build --target ${{ matrix.target }}
- name: Smoke test
if: matrix.can-test
shell: bash
run: |
./dist/sentry-linux-x64/bin/sentry --help
echo "Build successful!"
if [[ "${{ matrix.target }}" == "windows-x64" ]]; then
./dist/sentry-windows-x64/bin/sentry.exe --help
else
./dist/sentry-${{ matrix.target }}/bin/sentry --help
fi
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: sentry-${{ matrix.target }}
path: dist/sentry-*/bin/sentry*

build-npm:
name: Build npm Package
needs: [lint, test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- uses: actions/setup-node@v4
with:
node-version: '22'
- uses: actions/cache@v4
id: cache
with:
path: node_modules
key: node-modules-${{ hashFiles('bun.lock') }}
- if: steps.cache.outputs.cache-hit != 'true'
run: bun install --frozen-lockfile
- name: Bundle
env:
SENTRY_CLIENT_ID: ${{ vars.SENTRY_CLIENT_ID }}
run: bun run bundle
- name: Smoke test (Node.js)
run: node dist/bin.mjs --help
- run: npm pack
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: npm-package
path: '*.tgz'

merge-artifacts:
name: Merge Artifacts
needs: [build-binary, build-npm]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
- uses: actions/upload-artifact@v4
with:
name: ${{ github.sha }}
path: |
sentry-*/
npm-package/*.tgz
91 changes: 0 additions & 91 deletions .github/workflows/publish.yml

This file was deleted.

29 changes: 29 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Release
on:
workflow_dispatch:
inputs:
version:
description: Version to release (semver, bump type, or "auto")
required: true
default: 'auto'
force:
description: Force release even with blockers
required: false

jobs:
ci:
uses: ./.github/workflows/ci.yml
permissions:
contents: read
secrets: inherit

release:
needs: [ci]
uses: getsentry/craft/.github/workflows/release.yml@v2
with:
version: ${{ inputs.version }}
force: ${{ inputs.force }}
publish_repo: getsentry/publish
secrets: inherit
permissions:
contents: write
53 changes: 0 additions & 53 deletions .github/workflows/test.yml

This file was deleted.

Loading
Loading