Structure
ArchiveAction
Archives the app for distribution.
struct ArchiveActionOverview
iOS: Uses
xcodebuild archive, producing a.xcarchive. The resulting archive is consumed byExportActionto produce an IPA.Android: Uses
./gradlew bundle<Variant>, producing a signed.aab(Android App Bundle). For APK-only builds useBuildActioninstead. Gradle output is streamed live to the parent process (so a 15-minute build shows progress in CI), and a concise build summary (BUILD SUCCESSFUL …, theactionable tasks: … from cache …line, and any build-scan URL) is always printed at info level — even without--verbose. WhenoutputPathis set, the produced.aabis copied to that deterministic path.
Usage
// iOS
let result = try await ArchiveAction().run(
with: .init(scheme: "MyApp", exportMethod: "app-store"),
context: context
)
print("Archive: \(result.archivePath)")
// Android
let result = try await ArchiveAction().run(
with: .init(buildVariant: "release"),
context: androidContext
)
print("AAB: \(result.aabPath ?? "N/A")")Topics
Structures
struct OptionsConfiguration for the archive action.
struct ResultResult of a successful archive.
Initializers
init()Creates an
ArchiveAction.
Instance Methods
func run(with: ArchiveAction.Options, context: ActionContext) async throws -> ArchiveAction.ResultExecute the action with the given options.
Type Properties
static let description: StringLong-form description for
--helpoutput and documentation.static let name: StringHuman-readable identifier, e.g.
"build","upload".static var validationRules: [ActionValidationRule]
Default Implementations
Relationships
Conforms To
ActionSwift.SendableSwift.SendableMetatype