-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update release.yml ci: improve iOS builds Update release.yml
- Loading branch information
Showing
1 changed file
with
48 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -57,17 +57,53 @@ jobs: | |
run: | | ||
/usr/libexec/Plistbuddy -c "Set CFBundleVersion ${{ steps.semver.outputs.next }}" "iosApp/iosApp/Info.plist" | ||
/usr/libexec/Plistbuddy -c "Set CFBundleShortVersionString ${{ steps.semver.outputs.next }}" "iosApp/iosApp/Info.plist" | ||
- name: iOS Build App | ||
uses: yukiarrr/[email protected] | ||
with: | ||
project-path: iosApp/iosApp.xcodeproj | ||
p12-base64: ${{ secrets.P12_BASE64_KEY }} | ||
code-signing-identity: "iPhone Distribution" | ||
team-id: ${{ secrets.IOS_TEAM_ID }} | ||
certificate-password: ${{ secrets.P12_KEY_PASSWORD }} | ||
workspace-path: Untitled.xcworkspace | ||
export-method: "app-store" | ||
mobileprovision-base64: ${{ secrets.MOBILE_PROVISIONING_B64 }} | ||
- name: Install the Apple certificate and provisioning profile | ||
env: | ||
BUILD_CERTIFICATE_BASE64: ${{ secrets.P12_BASE64_KEY }} | ||
P12_PASSWORD: ${{ secrets.P12_KEY_PASSWORD }} | ||
BUILD_PROVISION_PROFILE_BASE64: ${{ secrets.MOBILE_PROVISIONING_B64 }} | ||
KEYCHAIN_PASSWORD: ${{ secrets.P12_KEY_PASSWORD }} | ||
run: | | ||
# create variables | ||
CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12 | ||
PP_PATH=$RUNNER_TEMP/build_pp.mobileprovision | ||
KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db | ||
# import certificate and provisioning profile from secrets | ||
echo -n "$BUILD_CERTIFICATE_BASE64" | base64 --decode -o $CERTIFICATE_PATH | ||
echo -n "$BUILD_PROVISION_PROFILE_BASE64" | base64 --decode -o $PP_PATH | ||
# create temporary keychain | ||
security create-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH | ||
security set-keychain-settings -lut 21600 $KEYCHAIN_PATH | ||
security unlock-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH | ||
# import certificate to keychain | ||
security import $CERTIFICATE_PATH -P "$P12_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH | ||
security list-keychain -d user -s $KEYCHAIN_PATH | ||
# apply provisioning profile | ||
mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles | ||
cp $PP_PATH ~/Library/MobileDevice/Provisioning\ Profiles | ||
- name: build archive | ||
run: | | ||
xcodebuild -scheme "iosApp" \ | ||
-workspace Untitled.xcworkspace \ | ||
-allowProvisioningUpdates \ | ||
-archivePath $RUNNER_TEMP/iosApp.xcarchive \ | ||
-sdk iphoneos \ | ||
-configuration Release \ | ||
-destination generic/platform=iOS \ | ||
clean archive | ||
- name: export ipa | ||
env: | ||
EXPORT_OPTIONS_PLIST: ${{ secrets.EXPORT_OPTIONS_PLIST }} | ||
run: | | ||
EXPORT_OPTS_PATH=iosApp/exportOptionsRelease.plist | ||
xcodebuild -exportArchive -archivePath $RUNNER_TEMP/iamgroot.xcarchive -exportOptionsPlist $EXPORT_OPTS_PATH -exportPath build/ | ||
- name: Create Release | ||
uses: ncipollo/[email protected] | ||
|
@@ -79,8 +115,7 @@ jobs: | |
name: ${{ steps.semver.outputs.next }} | ||
body: Changelog Contents | ||
token: ${{ github.token }} | ||
artifacts: "composeApp/build/outputs/apk/release/composeApp-release.apk,output.ipa" | ||
artifacts: "composeApp/build/outputs/apk/release/composeApp-release.apk,build/MGPlayer.ipa" | ||
generateReleaseNotes: true | ||
tag: ${{ steps.semver.outputs.next }} | ||
export-options: iosApp/exportOptionsRelease.plist | ||
|