Skip to content

Commit

Permalink
Add release to testflight action (#5)
Browse files Browse the repository at this point in the history
Also:
- change targets names
- add app icon
  • Loading branch information
sbihel authored Mar 15, 2024
1 parent b640a64 commit d11148c
Show file tree
Hide file tree
Showing 16 changed files with 145 additions and 15 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: cd

on:
push:
tags:
- "*"


jobs:
validation:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Validate tag is valid
run: |
echo "${{ github.ref_name }}" | grep -P '^[0-9]+\.[0-9]+\.[0-9]+$'
main:
runs-on: macos-14
needs: validation
steps:
- uses: actions/checkout@v4

- name: Install tools
uses: jdx/mise-action@v2
- name: Set up XCode
uses: mxcl/xcodebuild@v2
with:
xcode: 15.2
action: none
- name: Generate XCode project
run: tuist generate -n

- name: Import code sign
uses: Apple-Actions/import-codesign-certs@master
with:
p12-file-base64: ${{ secrets.APPSTORE_IOS_DISTRIBUTION_CERTIFICATES }}
p12-password: ${{ secrets.APPSTORE_IOS_DISTRIBUTION_CERTIFICATES_PASSWORD }}

- name: Download provisioning
uses: Apple-Actions/download-provisioning-profiles@master
with:
bundle-id: com.spruceid.wallet
issuer-id: ${{ secrets.APPSTORE_ISSUER_ID }}
api-key-id: ${{ secrets.APPSTORE_KEY_ID }}
api-private-key: ${{ secrets.APPSTORE_PRIVATE_KEY }}

- name: Build and sign archive
run: |
xcodebuild -parallelizeTargets -archivePath "./archive" CURRENT_PROJECT_VERSION="${{ github.ref_name }}" archive -scheme release CODE_SIGNING_ALLOWED="NO"
xcodebuild -exportArchive -exportOptionsPlist "Support/ExportOptions.plist" -archivePath "./archive.xcarchive" -exportPath "release"
- name: Upload to TestFlight
uses: Apple-Actions/upload-testflight-build@master
with:
app-path: release/App.ipa
issuer-id: ${{ secrets.APPSTORE_ISSUER_ID }}
api-key-id: ${{ secrets.APPSTORE_KEY_ID }}
api-private-key: ${{ secrets.APPSTORE_PRIVATE_KEY }}
2 changes: 2 additions & 0 deletions .mise.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[tools]
tuist = '4'
2 changes: 1 addition & 1 deletion .package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,5 @@
}
}
],
"version" : 3
"version" : 2
}
48 changes: 35 additions & 13 deletions Project.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ let project = Project(
"ENABLE_USER_SCRIPT_SANDBOXING": "YES",
"ENABLE_MODULE_VERIFIER": "YES",
"DEVELOPMENT_TEAM": "FZVYR3KYL4"
// "CODE_SIGN_IDENTITY": "Spruce Systems, Inc. (FZVYR3KYL4)"
]),
targets: [
.target(
Expand All @@ -20,61 +21,82 @@ let project = Project(
bundleId: "com.spruceid.wallet",
deploymentTargets: .iOS("16.0"),
infoPlist: .extendingDefault(with: [
"CFBundleDisplayName": "SpruceID Wallet",
"CFBundleDisplayName": "SpruceKit Wallet",
"CFBundleIconName": "AppIcon",
"CFBundlePackageType": "APPL",
"NSBluetoothAlwaysUsageDescription": "Secure transmission of mobile DL data",
"UILaunchScreen": [:]
]),
sources: ["Targets/App/Sources/**"],
resources: [
"Resources/**"
],
dependencies: [
.target(name: "AppKit"),
.target(name: "AppUI"),
.target(name: "AppAppKit"),
.target(name: "AppUIKit"),
]
),
.target(
name: "AppKit",
name: "AppAppKit",
destinations: [.iPhone],
product: .framework,
bundleId: "com.spruceid.wallet.kit",
deploymentTargets: .iOS("16.0"),
infoPlist: .default,
sources: ["Targets/AppKit/Sources/**"],
sources: ["Targets/AppAppKit/Sources/**"],
dependencies: [ ]
),
.target(
name: "AppKitTests",
name: "AppAppKitTests",
destinations: [.iPhone],
product: .unitTests,
bundleId: "com.spruceid.wallet.kittests",
deploymentTargets: .iOS("16.0"),
infoPlist: .default,
sources: ["Targets/AppKit/Tests/**"],
sources: ["Targets/AppAppKit/Tests/**"],
dependencies: [
.target(name: "AppKit")
.target(name: "AppAppKit")
]
),
.target(
name: "AppUI",
name: "AppUIKit",
destinations: [.iPhone],
product: .framework,
bundleId: "com.spruceid.wallet.ui",
deploymentTargets: .iOS("16.0"),
infoPlist: .default,
sources: ["Targets/AppUI/Sources/**"],
sources: ["Targets/AppUIKit/Sources/**"],
dependencies: [
.package(product: "SpruceIDWalletSdk", type: .runtime),
]
),
.target(
name: "AppUITests",
name: "AppUIKitTests",
destinations: [.iPhone],
product: .unitTests,
bundleId: "com.spruceid.wallet.uitests",
deploymentTargets: .iOS("16.0"),
infoPlist: .default,
sources: ["Targets/AppUI/Tests/**"],
sources: ["Targets/AppUIKit/Tests/**"],
dependencies: [
.target(name: "AppUI")
.target(name: "AppUIKit")
]
)
],
schemes: [
.scheme(
name: "release",
shared: true,
buildAction: .buildAction(targets: ["App"]),
runAction: .runAction(executable: "App"),
archiveAction: .archiveAction(configuration: .release)
),
.scheme(
name: "debug",
shared: true,
buildAction: .buildAction(targets: ["App"]),
runAction: .runAction(executable: "App"),
archiveAction: .archiveAction(configuration: .debug)
)
]
)
14 changes: 14 additions & 0 deletions Resources/Assets.xcassets/AppIcon.appiconset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"images" : [
{
"filename" : "Frame 1.jpg",
"idiom" : "universal",
"platform" : "ios",
"size" : "1024x1024"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions Resources/Assets.xcassets/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
27 changes: 27 additions & 0 deletions Support/ExportOptions.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>destination</key>
<string>export</string>
<key>manageAppVersionAndBuildNumber</key>
<true/>
<key>method</key>
<string>app-store</string>
<key>provisioningProfiles</key>
<dict>
<key>com.spruceid.wallet</key>
<string>SpruceKit Wallet profile</string>
</dict>
<key>signingCertificate</key>
<string>iPhone Distribution</string>
<key>signingStyle</key>
<string>manual</string>
<key>stripSwiftSymbols</key>
<true/>
<key>uploadSymbols</key>
<true/>
<key>teamID</key>
<string>FZVYR3KYL4</string>
</dict>
</plist>
2 changes: 1 addition & 1 deletion Targets/App/Sources/App.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import SwiftUI
import AppUI
import AppUIKit

@main
struct AppApp: App {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit d11148c

Please sign in to comment.