8282Each platform follows a consistent architecture:
8383
84841 . ** Native Bridge** - Platform-specific interface to native SDK
85-
8685 - Android: JNI via ` AndroidJavaClass ` /` AndroidJavaObject `
8786 - iOS/macOS: Objective-C via ` DllImport("__Internal") `
8887 - Windows/Linux: P/Invoke via ` DllImport("sentry") `
@@ -108,20 +107,20 @@ Each platform follows a consistent architecture:
108107
109108The CI system uses modular, reusable workflows in ` .github/workflows/ ` :
110109
111- | Workflow | Purpose |
112- | ------------------------------ | -------------------------------------------------- |
113- | ` ci.yml ` | Main pipeline - triggers on push/PR |
114- | ` build.yml ` | Reusable build workflow |
115- | ` sdk.yml ` | Native SDK builds (Android, Linux, Windows, Cocoa) |
116- | ` test-create.yml ` | Creates integration test projects |
117- | ` test-build-android.yml ` | Builds Android test apps |
118- | ` test-run-android.yml ` | Runs Android tests on emulator |
119- | ` test-build-ios.yml ` | Builds iOS test apps |
120- | ` test-compile-ios.yml ` | Compiles iOS Xcode projects |
121- | ` test-run-ios.yml ` | Runs iOS tests on simulator |
122- | ` release.yml ` | Manual release preparation |
123- | ` update-deps.yml ` | Scheduled dependency updates (daily) |
124- | ` create-unity-matrix.yml ` | Generates test matrix |
110+ | Workflow | Purpose |
111+ | ------------------------- | -------------------------------------------------- |
112+ | ` ci.yml ` | Main pipeline - triggers on push/PR |
113+ | ` build.yml ` | Reusable build workflow |
114+ | ` sdk.yml ` | Native SDK builds (Android, Linux, Windows, Cocoa) |
115+ | ` test-create.yml ` | Creates integration test projects |
116+ | ` test-build-android.yml ` | Builds Android test apps |
117+ | ` test-run-android.yml ` | Runs Android tests on emulator |
118+ | ` test-build-ios.yml ` | Builds iOS test apps |
119+ | ` test-compile-ios.yml ` | Compiles iOS Xcode projects |
120+ | ` test-run-ios.yml ` | Runs iOS tests on simulator |
121+ | ` release.yml ` | Manual release preparation |
122+ | ` update-deps.yml ` | Scheduled dependency updates (daily) |
123+ | ` create-unity-matrix.yml ` | Generates test matrix |
125124
126125### Unity Version Matrix
127126
@@ -151,15 +150,15 @@ Builds run in Docker containers using `ghcr.io/unityci/editor` images:
151150
152151Key targets defined in ` Directory.Build.targets ` :
153152
154- | Target | Purpose |
155- | -------------------------------------- | --------------------------------------- |
156- | ` DownloadNativeSDKs ` | Downloads prebuilt native SDKs from CI |
157- | ` BuildAndroidSDK ` | Builds Android SDK via Gradle |
158- | ` BuildLinuxSDK ` | Builds Linux SDK via CMake |
159- | ` BuildWindowsSDK ` | Builds Windows SDK via CMake (Crashpad) |
160- | ` BuildCocoaSDK ` | Downloads iOS/macOS SDKs from releases |
161- | ` UnityEditModeTest ` | Runs edit-mode unit tests |
162- | ` UnityPlayModeTest ` | Runs play-mode tests |
153+ | Target | Purpose |
154+ | -------------------- | --------------------------------------- |
155+ | ` DownloadNativeSDKs ` | Downloads prebuilt native SDKs from CI |
156+ | ` BuildAndroidSDK ` | Builds Android SDK via Gradle |
157+ | ` BuildLinuxSDK ` | Builds Linux SDK via CMake |
158+ | ` BuildWindowsSDK ` | Builds Windows SDK via CMake (Crashpad) |
159+ | ` BuildCocoaSDK ` | Downloads iOS/macOS SDKs from releases |
160+ | ` UnityEditModeTest ` | Runs edit-mode unit tests |
161+ | ` UnityPlayModeTest ` | Runs play-mode tests |
163162
164163### Artifact Caching
165164
@@ -254,6 +253,49 @@ Scripts involved:
254253
255254` test/Scripts.Tests/test-pack-contents.ps1 ` validates package contents against a snapshot to detect unintended changes.
256255
256+ ### Release Process (Craft)
257+
258+ Releases are managed by [ craft] ( https://github.com/getsentry/craft ) . The process has two phases:
259+
260+ ** Phase 1 — Prepare (` .github/workflows/release.yml ` ):**
261+
262+ 1 . Triggered manually via ` workflow_dispatch ` with optional version input (or ` "auto" ` )
263+ 2 . Runs ` craft prepare ` which:
264+ - Resolves the version (auto-detects from commits when ` versioning.policy: auto ` )
265+ - Creates a ` release/<version> ` branch from main
266+ - Stamps ` ## Unreleased ` → ` ## <version> ` in ` CHANGELOG.md `
267+ - Runs ` scripts/bump-version.sh ` to update version in ` Directory.Build.props ` , ` package/package.json ` , and READMEs
268+ - Commits as ` release: <version> ` , pushes the branch
269+ 3 . CI (` ci.yml ` ) triggers on the release branch push, building the ` package-release.zip ` artifact
270+ 4 . Craft creates a publish request issue on ` getsentry/publish `
271+
272+ ** Phase 2 — Publish (triggered from ` getsentry/publish ` ):**
273+
274+ 1 . The publish issue is accepted (labeled ` accepted ` )
275+ 2 . ` craft publish ` checks out the release branch, downloads the ` package-release.zip ` artifact
276+ 3 . Publishes to targets defined in ` .craft.yml ` :
277+ - ** ` upm ` ** : Clones ` getsentry/unity ` , replaces content with ` package-release.zip ` , pushes, creates GitHub release
278+ - ** ` github ` ** : Creates GitHub release on ` sentry-unity ` with artifacts and changelog
279+ - ** ` registry ` ** : Publishes to Sentry's package registry
280+ 4 . Merges the release branch back to main, then deletes it
281+
282+ ** Key configuration (` .craft.yml ` ):**
283+
284+ ``` yaml
285+ minVersion : 2.21.4
286+ changelogPolicy : auto
287+ artifactProvider :
288+ name : github
289+ config :
290+ artifacts : package-release # Must match the artifact name in build.yml
291+ ` ` `
292+
293+ **How the UPM package gets its CHANGELOG:**
294+
295+ - ` scripts/pack.ps1` copies root `CHANGELOG.md` into `package-release/`
296+ - CI on the release branch runs `pack.ps1`, so the artifact contains the stamped changelog
297+ - The UPM target extracts this artifact into `getsentry/unity`
298+
257299---
258300
259301# # 5. Native Platform Support
@@ -500,12 +542,12 @@ Key options:
500542
501543### Test Types
502544
503- | Type | Command | Location |
504- | ------------ | -------------------------------------------------------- | --------------------------------- |
505- | Edit Mode | ` dotnet msbuild /t:UnityEditModeTest ` | ` test/Sentry.Unity.Tests/ ` |
506- | Play Mode | ` dotnet msbuild /t:UnityPlayModeTest ` | ` test/Sentry.Unity.Tests/ ` |
507- | Editor Tests | ` dotnet msbuild /t:UnityEditModeTest ` | ` test/Sentry.Unity.Editor.Tests/ ` |
508- | Integration | ` integration-test.ps1 ` | ` test/Scripts.Integration.Test/ ` |
545+ | Type | Command | Location |
546+ | ------------ | ------------------------------------- | --------------------------------- |
547+ | Edit Mode | ` dotnet msbuild /t:UnityEditModeTest ` | ` test/Sentry.Unity.Tests/ ` |
548+ | Play Mode | ` dotnet msbuild /t:UnityPlayModeTest ` | ` test/Sentry.Unity.Tests/ ` |
549+ | Editor Tests | ` dotnet msbuild /t:UnityEditModeTest ` | ` test/Sentry.Unity.Editor.Tests/ ` |
550+ | Integration | ` integration-test.ps1 ` | ` test/Scripts.Integration.Test/ ` |
509551
510552### Running All Tests
511553
@@ -616,12 +658,3 @@ Configured through Editor window (Debug Symbols tab):
616658- iOS: XCFramework with Objective-C bridge
617659- macOS: DYLIB with Objective-C bridge
618660- Windows/Linux: DLLs/SOs with P/Invoke
619-
620- ---
621-
622- ## 9. Notes & Discoveries
623-
624- <!--
625- This section captures learnings discovered during development sessions.
626- Format: - [YYYY-MM-DD] Category: Note
627- -->
0 commit comments