Skip to content

Commit

Permalink
Update ios.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
WindowsMEMZ authored Dec 14, 2023
1 parent 1670cd4 commit 4118b45
Showing 1 changed file with 22 additions and 36 deletions.
58 changes: 22 additions & 36 deletions .github/workflows/ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,42 +63,28 @@ jobs:
KEY_PATH=$RUNNER_TEMP/ascapi-key.p8
echo -n "$ASCAPI_KEY" > $KEY_PATH
- name: Install the Apple certificate and provisioning profile for Xcode
env:
BUILD_CERTIFICATE_BASE64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }}
P12_PASSWORD: ${{ secrets.P12_PASSWORD }}
BUILD_PROVISION_PROFILE_BASE64: ${{ secrets.BUILD_PROVISION_PROFILE_BASE64 }}
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_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: Archive DarockBili App
env:
ASCAPI_KEY_ID: ${{ secrets.ASCAPI_KEY_ID }}
ASCAPI_ISSUER_ID: ${{ secrets.ASCAPI_ISSUER_ID }}
run: |
KEY_PATH=$RUNNER_TEMP/ascapi-key.p8
xcodebuild -scheme 'DarockBili Watch App' -configuration Release DEVELOPMENT_TEAM=B57D8PP775 -archivePath DarockBili_Release.xcarchive clean archive CODE_SIGN_IDENTITY="Apple Development" -allowProvisioningUpdates -authenticationKeyPath $KEY_PATH -authenticationKeyID $ASCAPI_KEY_ID -authenticationKeyIssuerID $ASCAPI_ISSUER_ID
- name: Build and Archive
uses: sparkfabrik/[email protected]
with:
upload-to-testflight: false
configuration: Release
export-method: app-store
scheme: DarockBili Watch App
output-path: MeowBili-Release.ipa
apple-key-id: ${{ secrets.ASCAPI_KEY_ID }}
apple-key-issuer-id: ${{ secrets.ASCAPI_ISSUER_ID }}
apple-key-content: ${{ secrets.ASCAPI_KEY }}
team-id: B57D8PP775
team-name: Yuxuan Chen
ios-app-id: com.darock.DarockBili

#- name: Archive DarockBili App
# env:
# ASCAPI_KEY_ID: ${{ secrets.ASCAPI_KEY_ID }}
# ASCAPI_ISSUER_ID: ${{ secrets.ASCAPI_ISSUER_ID }}
# run: |
# KEY_PATH=$RUNNER_TEMP/ascapi-key.p8
# xcodebuild -scheme 'DarockBili Watch App' -configuration Release DEVELOPMENT_TEAM=B57D8PP775 -archivePath DarockBili_Release.xcarchive clean archive CODE_SIGN_IDENTITY="Apple Development" -allowProvisioningUpdates -authenticationKeyPath $KEY_PATH -authenticationKeyID $ASCAPI_KEY_ID -authenticationKeyIssuerID $ASCAPI_ISSUER_ID

- name: Upload Debug Archive
uses: actions/upload-artifact@v3
Expand Down

0 comments on commit 4118b45

Please sign in to comment.