Action/Shared workflow to sign & upload apps to apple's app store(s) & testflight.
macossets entitlements, adds provision, resigns packages, resigns app, and packages into a signed installer. Making it MacAppStore compatible- This action is currently hard-coded to set the following entitlements. These will change to be an input variable later
com.apple.security.app-sandboxcom.apple.security.network.clientcom.apple.security.network.servercom.apple.developer.applesignin
- This action is currently hard-coded to set the following entitlements. These will change to be an input variable later
ios&appletvoscan take.xcarchives, embed mobile provision file convert to.ipaand sign
These inputs apply to the commandline (Prefixed with --) as well as the action, or can be put in environment variables
AppFilename=pathpath to app (Mac.App) or ios archive (ios.ipa)Upload=truedefaulted to true, set to false to only do a verifyTestFlightPlatform=macos|ios|appletvosNote it's is nottvos. This is the native argument for apple tools.AppStoreConnect_Auth_KeyAn Auth Key from app store connect, like1234A5B6CDAppStoreConnect_Auth_IssuerIssuer from appstore connect (same page!) - a long hex guidaaaaaaaa-bbbb-aaaa-dddd-12345678901AppStoreConnect_Auth_P8_Base64.p8file from AppStoreConnect encoded to base64base64 -i ./AuthKey.p8 > AuthKey.p8.base64.txt- Copy this base64 data into a secret and pass into action
- or testing locally
export AppStoreConnect_Auth_P8_Base64=$(base64 -i ./AuthKey.p8)
ProvisioningProfile_Base64env or input should be a base64 encoded version of yourembedded.mobileprovisionthat will be inserted into your .ipa to allow testflight to be used(provisioned)base64 -i ./embedded.mobileprovision > embedded.mobileprovision.base64.txt- Copy this base64 data into a secret and pass into action
- or testing locally
export ProvisioningProfile_Base64=$(base64 -i ./embedded.mobileprovision)
SignApp=true(defaulted to true) will re-sign internal.dylibsand.frameworks, insert entitlements, modifyinfo.plistwith required keys and re-sign app.BundleVersion=0if provided, a new bundle-version (Your App 1.2.3(0)build version) is inserted intoInfo.plistto allow re-submission of same versionSignPackage=true(defaulted totrue) this will sign the package with an installer certificate. The certificate is found internally by matching the team id.TeamIdentifier=AA1A111A1Your team identifier (find this in any of your certificates next to your team name envinKeychain access, or in AppStoreConnect)SigningCertificate_P12_Base64env or input should be a base64 encoded version of your~Apple ~Distributionsigning certificate exported to.p12- Get this from https://developer.apple.com under
Certificates, find the one forDistribution - Download the
distribution.cercertificate and install to keychain access and should appear asApple Distribution: Company (TeamIdentifier) - Export this to
.p12(Must be in yourlogin/personal keychain to export) with a password. base64 -i ./AppleDistribution.p12 > AppleDistribution.p12.base64.txt- Copy this base64 data into a secret and pass into action
- or testing locally
export SigningCertificate_P12_Base64=$(base64 -i ./AppleDistribution.p12)
- Get this from https://developer.apple.com under
SigningCertificate_Passwordenv or input which is the password to the above.p12exported certificateProvisioningProfile_Base64env or input should be a base64 encoded version of yourembedded.provisionprofilethat will be inserted into your .app to allow testflight to be used(provisioned)- Get your
.provisionprofilefrom https://developer.apple.com underProfiles, then find the provisioning profile for theMac App Store. Then download. base64 -i ./embedded.provisionprofile > embedded.provisionprofile.base64.txt- Copy this base64 data into a secret and pass into action
- or testing locally
export ProvisioningProfile_Base64=$(base64 -i ./embedded.provisionprofile)
- Get your
InstallerCertificate_P12_Base64env or input should be a base64 encodedMac Installer Distribution Certificate- Get your
mac_installer.cerfrom https://developer.apple.com underCertificates, find the one forac Installer Distribution Certificate - Install to keychain (must be under a local keychain) and should appear as
3rd party mac developer installer - Export to
mac_installer.p12with password base64 -i ./mac_installer.p12 > mac_installer.p12.base64.txtexport InstallerCertificate_P12_Base64=$(base64 -i ./mac_installer.p12)
- Get your
- Make a build, or download an artifiact from Unity cloud build with your
Mac.appinside brew install nodenpm installnode ./AppleAppStoreUpload.js- `export AppStoreConnect_Auth_P8_Base64=$(base64 -i Auth.p8)
-
node ./AppleAppStoreUpload.js ` --AppFilename=./Mac.app --SignApp=true --TestFlightPlatform=macos --TeamIdentifier=AA1A111A1 --AppStoreConnect_Auth_Key=1111A1A1AA --AppStoreConnect_Auth_Issuer=ffffffff-ffff-ffff-ffff-ffffffffffff --SigningCertificate_Password=password --InstallerCertificate_Password=password
### For tvos or ios
If building to an unsigned `.xcarchive`
- Download Tvos/Ios app store `.mobileprovision` file from `profiles` in https://appstoreconnect.apple.com
- `export ProvisioningProfile_Base64=$(base64 -i your.mobileprovision)`
- ```
node ./AppleAppStoreUpload.js
--AppFilename=./Tvos.xcarchive
--TestFlightPlatform=appletvos
--AppStoreConnect_Auth_Key=1111A1A1AA AppStoreConnect_Auth_Issuer=ffffffff-ffff-ffff-ffff-ffffffffffff InstallerCertificateId="AAAAAAAAAA"