Swiftlane contains a set of build utilities to speed up iOS and macOS development and deployment
There's no additional configuration file, your Swift script file is the source of truth. With auto completion and type safety, you are ensured to do the right things in Swiftlane.
Swiftlane is intended to be used as a Swift Package. Please consult Examples
folder for ways to integrate
import Swiftlane
import AppStoreConnect
@main
struct Script {
static func main() async throws {
try await deployMyApp()
}
private static func deployMyApp() async throws {
var workflow = Workflow()
workflow.directory = Settings.fs
.homeDirectory()
.appendingPathComponent("Projects/swiftlane/Examples/MyApp")
workflow.xcodeApp = URL(string: "/Applications/Xcode.app")
let build = Build()
build.project("MyApp")
build.allowProvisioningUpdates()
build.destination(platform: .iOSSimulator, name: "iPhone 13")
build.workflow = workflow
try await build.run()
guard
let issuerId = Settings.env["ASC_ISSUER_ID"],
let privateKeyId = Settings.env["ASC_PRIVATE_KEY_ID"],
let privateKey = Settings.env["ASC_PRIVATE_KEY"]
else { return }
let asc = try ASC(
credential: AppStoreConnect.Credential(
issuerId: issuerId,
privateKeyId: privateKeyId,
privateKey: privateKey
)
)
try await asc.fetchCertificates()
try await asc.fetchProvisioningProfiles()
let keychain = try await Keychain.create(
path: Keychain.Path(
rawValue: Settings.fs
.downloadsDirectory
.appendingPathComponent("custom.keychain")),
password: "keychain_password"
)
try await keychain.unlock()
try await keychain.import(
certificateFile: Settings.fs
.downloadsDirectory
.appendingPathComponent("abcpass.p12"),
certificatePassword: "123"
)
}
}
Configurations via Settings
Swiftlane is released under the MIT license. See LICENSE for details.
link |
Stars: 685 |
Last commit: 25 weeks ago |
Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics