Skip to content

Commit

Permalink
Merge pull request #4 from WindowsMEMZ/Github-Action-Fixing
Browse files Browse the repository at this point in the history
Update ios.yml and removed ds.store
  • Loading branch information
WindowsMEMZ authored Oct 15, 2023
2 parents 5444e90 + 2a02d78 commit a275701
Show file tree
Hide file tree
Showing 12 changed files with 32 additions and 41 deletions.
Binary file removed .DS_Store
Binary file not shown.
64 changes: 31 additions & 33 deletions .github/workflows/ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,44 +18,42 @@ jobs:
- name: Set Xcode Version
run: sudo xcode-select -s /Applications/Xcode_15.0.app

- name: Install the Apple certificate and provisioning profile
- name: Get App Store Connect API Key File
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 }}
ASCAPI_KEY: ${{ secrets.ASCAPI_KEY }}
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
KEY_PATH=$RUNNER_TEMP/ascapi-key.p8
echo -n "$ASCAPI_KEY" > $KEY_PATH
# 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
- name: Resolve Swift dependencies
run: xcodebuild -resolvePackageDependencies -scheme BAGen -configuration Debug

# 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
- name: Archive SwiftArchive App
env:
ASCAPI_KEY_ID: ${{ secrets.ASCAPI_KEY_ID }}
ASCAPI_ISSUER_ID: ${{ secrets.ASCAPI_ISSUER_ID }}
run: |
xcodebuild -scheme BAGen -configuration Debug DEVELOPMENT_TEAM=B57D8PP775 -sdk 'iphoneos' -destination 'generic/platform=iOS' -archivePath app.xcarchive clean archive CODE_SIGN_IDENTITY="Apple Development"
KEY_PATH=$RUNNER_TEMP/ascapi-key.p8
xcodebuild -scheme BAGen -configuration Debug DEVELOPMENT_TEAM=B57D8PP775 -sdk 'iphoneos' -destination 'generic/platform=iOS' -archivePath BAGen_Debug.xcarchive clean archive CODE_SIGN_IDENTITY="Apple Development" -allowProvisioningUpdates -authenticationKeyPath $KEY_PATH -authenticationKeyID $ASCAPI_KEY_ID -authenticationKeyIssuerID $ASCAPI_ISSUER_ID
xcodebuild -scheme BAGen -configuration Release DEVELOPMENT_TEAM=B57D8PP775 -sdk 'iphoneos' -destination 'generic/platform=iOS' -archivePath BAGen_Release.xcarchive clean archive CODE_SIGN_IDENTITY="Apple Development" -allowProvisioningUpdates -authenticationKeyPath $KEY_PATH -authenticationKeyID $ASCAPI_KEY_ID -authenticationKeyIssuerID $ASCAPI_ISSUER_ID
- name: Export IPA
run: xcodebuild -exportArchive -archivePath app.xcarchive -exportPath ./ -exportOptionsPlist ExportOptions.plist
run: |
mkdir ./Export_Debug
mkdir ./Export_Release
xcodebuild -exportArchive -archivePath BAGen_Debug.xcarchive -exportPath ./Export_Debug -exportOptionsPlist ExportOptions.plist
xcodebuild -exportArchive -archivePath BAGen_Release.xcarchive -exportPath ./Export_Release -exportOptionsPlist ExportOptions.plist
- name: Upload Debug IPA
uses: actions/upload-artifact@v3
with:
name: Debug.ipa
path: ./Export_Debug/BAGen.ipa

- name: Upload Artifact
uses: actions/upload-artifact@v2
- name: Upload Release IPA
uses: actions/upload-artifact@v3
with:
name: ipa
path: ./*.ipa
name: Release.ipa
path: ./Export_Release/BAGen.ipa
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
9 changes: 1 addition & 8 deletions ExportOptions.plist
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,8 @@
<string>export</string>
<key>method</key>
<string>development</string>
<key>provisioningProfiles</key>
<dict>
<key>com.Neinnko.BAGen</key>
<string>SwiftArchive</string>
</dict>
<key>signingCertificate</key>
<string>Apple Development</string>
<key>signingStyle</key>
<string>manual</string>
<string>automatic</string>
<key>stripSwiftSymbols</key>
<true/>
<key>teamID</key>
Expand Down

0 comments on commit a275701

Please sign in to comment.