Building for Release
CLI Build Commands
The CLI provides vue-native build for creating release builds. It automatically bundles the JS before building the native project.
# Build iOS release
vue-native build ios
# Build Android APK
vue-native build android
# Build Android App Bundle (.aab) for Play Store
vue-native build android --aab
Build Options
| Flag | Description |
|---|---|
--mode <mode> | Build mode (default: release) |
--output <path> | Output directory for the build artifact (default: ./build) |
--scheme <scheme> | Xcode scheme to build (iOS only) |
--aab | Build Android App Bundle instead of APK (Android only) |
Examples
# Release build with custom output directory
vue-native build ios --output ./artifacts
# Debug build
vue-native build ios --mode debug
# Specific Xcode scheme
vue-native build ios --scheme MyApp-Staging
# Android App Bundle for Play Store
vue-native build android --aab --output ./release
The CLI auto-bundles the JS before running the native build — you do not need to run bun run build separately.
Manual Build
If you prefer to build manually without the CLI, you can bundle the JS first:
bun run build
This produces an optimized, minified dist/vue-native-bundle.js.
iOS
- Build the bundle:
bun run build - Open
ios/in Xcode - Select your scheme and a real device or "Any iOS Device"
- Product → Archive
- In the Organizer, click Distribute App and follow the steps
The build script in project.yml automatically copies dist/vue-native-bundle.js into the app bundle at build time.
Android
- Build the bundle:
bun run build - Copy
dist/vue-native-bundle.jstoandroid/app/src/main/assets/ - In Android Studio: Build → Generate Signed Bundle / APK
- Choose Android App Bundle for Play Store, or APK for direct distribution
Automate asset copying
Add a Gradle task to your android/app/build.gradle.kts to copy the bundle automatically:
tasks.register<Copy>("copyJsBundle") {
from("../../dist/vue-native-bundle.js")
into("src/main/assets")
}
tasks.named("preBuild") { dependsOn("copyJsBundle") }
CI Pipeline
Every push to main and every pull request runs three parallel jobs in GitHub Actions:
| Job | Runner | Steps |
|---|---|---|
| TypeScript | ubuntu-latest | lint → typecheck → build → test → dead code check (knip) |
| Swift | macos-14 | SwiftLint → build VueNativeCore → XCTest (114 tests on iPhone simulator) |
| Kotlin | ubuntu-latest | ktlint → build VueNativeCore → JUnit + Robolectric (83 tests) |
Running the full pipeline locally
# TypeScript
bun run lint && bun run typecheck && bun run build && bun run test
# iOS
cd native/ios && swiftlint lint
xcodebuild test \
-scheme VueNativeCore \
-sdk iphonesimulator \
-destination 'platform=iOS Simulator,name=iPhone 16,OS=18.0' \
-skipPackagePluginValidation
# Android
cd native/android
./gradlew :VueNativeCore:ktlintCheck :VueNativeCore:testReleaseUnitTest
Publishing
Pushing a git tag matching v* (e.g., v0.4.13) triggers the publish workflow:
- npm — publishes
@thelacanians/vue-native-runtime,@thelacanians/vue-native-navigation,@thelacanians/vue-native-vite-plugin, and@thelacanians/vue-native-clito npm - Swift Package — validated via xcodebuild (SPM resolves directly from the git tag)
- Android Maven — publishes
com.vuenative:coreto GitHub Packages