> ## Documentation Index
> Fetch the complete documentation index at: https://boutiquedb.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Publishing Releases

> Prepare, validate, tag, and publish BoutiqueDB releases and package artifacts.

# Publishing BoutiqueDB (SPI / GitHub)

## Permanent rule: iOS + macOS

Public / SPI releases **must** include a multi-arch `TursoSDK.xcframework`:

| Slice | Architectures |
| - | - |
| macOS | arm64 + x86\_64 (universal) |
| iOS device | arm64 |
| iOS Simulator | arm64 + x86\_64 (universal) |

Never ship macOS-only binaries for SPI. See `AGENTS.md`.

## Checklist

* [x] `LICENSE` (MIT), `NOTICE`
* [x] Package icon (`Assets/BoutiqueDB.png`, `icon.png`)
* [x] `.spi.yml` — **macos-xcodebuild** + **ios**
* [x] `Package.swift` without `unsafeFlags` (binary `TursoSDK`)
* [x] Public repo [BoutiqueDB-Swift](https://github.com/tuliopc23/BoutiqueDB-Swift)
* [x] Multi-arch xcframework (macOS + iOS device + Simulator)
* [x] Stable engine binary `v0.2.1` + zip asset + checksum in `Package.swift`
* [x] Production-beta package tag `v0.3.0-beta.1` (reuses verified v0.2.1 binary)
* [ ] SPI “Add a Package” OAuth (owner): [https://swiftpackageindex.com/add-a-package](https://swiftpackageindex.com/add-a-package)
* [ ] GitHub Actions billing unlocked (hosted runners currently blocked on account)

## Build binary

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
# Full SPI set (default — do this for every public release)
./Scripts/build-turso-sdk-xcframework.sh

# Update Package.swift with printed checksum
swift package compute-checksum Vendor/TursoSDK.xcframework.zip
```

`Vendor/TursoSDK.xcframework` is gitignored. CI and releases attach/build the zip.

## Consumer install

```swift theme={"theme":{"light":"github-light","dark":"github-dark"}}
.package(
  url: "https://github.com/tuliopc23/BoutiqueDB-Swift.git",
  exact: "0.3.0-beta.1"
)
```

## Tag + release

Prerelease tags reuse the already verified binary version declared in
`Package.swift`; the release workflow runs source, test, DocC, consumer, and iOS
gates before creating a GitHub prerelease. Stable tags rebuild and attach a new
full multi-architecture engine archive.

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
git tag -a v0.3.0-beta.1 -m "BoutiqueDB 0.3.0-beta.1"
git push origin main v0.3.0-beta.1
```

## SPI

1. Clean clone resolves (no local Vendor binary → URL binaryTarget).
2. No `unsafeFlags`.
3. [https://swiftpackageindex.com/add-a-package](https://swiftpackageindex.com/add-a-package) → `https://github.com/tuliopc23/BoutiqueDB-Swift`
4. Expect macOS + iOS platform badges after first index.

## Verifying a release asset

Before tagging, confirm the published `TursoSDK.xcframework.zip` is multi-arch and
matches `Package.swift`:

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
curl -L -o /tmp/TursoSDK.xcframework.zip \
  https://github.com/tuliopc23/BoutiqueDB-Swift/releases/download/vX.Y.Z/TursoSDK.xcframework.zip
swift package compute-checksum /tmp/TursoSDK.xcframework.zip
unzip -q /tmp/TursoSDK.xcframework.zip -d /tmp/TursoSDK
find /tmp/TursoSDK/TursoSDK.xcframework -name '*.a' -exec lipo -info {} \;
```

Expected slices: macOS `arm64`+`x86_64`, `ios-arm64`, `ios-*-simulator`.

## GitHub Actions note

If Actions jobs fail immediately with *account is locked due to a billing issue*,
that is a **hosting/billing lock**, not a package defect. Local gates before push:

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
swift build -Xswiftc -warnings-as-errors
swift test
swift format lint --strict --recursive Sources Tests Package.swift
./Scripts/build-docs.sh
(cd Examples/Consumer && swift build -Xswiftc -warnings-as-errors)
xcodebuild -scheme BoutiqueDB-Package \
  -destination 'generic/platform=iOS Simulator' \
  -skipPackagePluginValidation -skipMacroValidation \
  ONLY_ACTIVE_ARCH=YES ARCHS=arm64 build
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.