Add green border in RSVPS #24
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
name: Deploy-iOS-PROD | |
on: | |
push: | |
branches: main | |
env: | |
WORKSPACE: ${{ ‘ios/OneBoulder.xcworkspace’ }} | |
SCHEME: ${{ ‘OneBoulder’ }} | |
CONFIGURATION: ${{ ‘Release’ }} | |
ARCHIVE_PATH: ${{ ‘build/OneBoulder.xcarchive’ }} | |
EXPORT_PATH_STAGING: ${{ ‘dev’ }} | |
EXPORT_PATH_PROD: ${{ ‘prod’ }} | |
PLIST_PATH_STAGING: ${{‘ios/OneBoulder/Info.plist’ }} | |
PLIST_PATH_PROD: ${{ ‘ios/OneBoulder/Info.plist’ }} | |
APP_CENTER_TOKEN_PROD: ${{ toJSON(secrets.APPLE_ONELOCAL_DISTRIBUTION_CERTIFICATE)}} | |
APP_CENTER_TOKEN_STAGING: ${{ toJSON(secrets.APPLE_ONELOCAL_DISTRIBUTION_CERTIFICATE)}} | |
ARTIFACT_NAME: ${{ ‘OneBoulder.ipa’ }} | |
ARTIFACT_PATH_STAGING: ${{ ‘/build/dev’ }} | |
ARTIFACT_PATH_PROD: ${{ ‘/build/prod’ }} | |
APP_NAME_STAGING: ${{ ‘OneBoulder-iOS/ONELocal_ENV_DEV’ }} | |
APP_NAME_PROD: ${{ ‘OneBoulder-iOS/ONELocal_ENV_DEV’ }} | |
TESTING_GROUP_STAGING: ${{ ‘ONELocal_ENV_DEV’ }} | |
TESTING_GROUP_PROD: ${{ ‘Tuvoc’ }} | |
UPLOAD_FILE_STAGING: ${{ ‘dev/OneBoulder.ipa’ }} | |
UPLOAD_FILE_PROD: ${{ ‘prod/OneBoulder.ipa’ }} | |
DISTRIBUTION_CERTIFICATE: ${{ toJSON(secrets.APPLE_APP_DISTRIBUTION_CERTIFICATE) }} | |
CERTIFICATE_PASSWORD: ${{ toJSON(secrets.KEYCHAIN_PWD) }} | |
DISTRIBUTION_PROFILE_PROD: ${{toJSON(secrets.APPLE_DISTRIBUTION_PROFILE) }} | |
DISTRIBUTION_PROFILE_STAGING: ${{ toJSON(secrets.APPLE_AD-HOC_PROFILE) }} | |
KEY_PWD: ${{ toJSON(secrets.KEYCHAIN_PWD) }} | |
jobs: | |
build: | |
runs-on: macos-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Set up Node.js 21.5.0 | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 21.5.0 | |
- name: Install dependencies | |
run: npm install | |
- name: Install pod dependencies | |
run: | | |
cd ios && pod install | |
- name: Signing & Provisioning | |
run: | | |
- name: Select Xcode | |
run: sudo xcode-select -switch /Applications/Xcode_15.3.app | |
- name: Xcode Version | |
run: /usr/bin/xcodebuild -version | |
- name: Create build folder | |
run: mkdir -p build && mkdir -p dev && mkdir -p prod | |
- name: Build Archive | |
run: | | |
xcodebuild -workspace $WORKPLACE -scheme $SCHEME -configuration $CONFIGURATION \ | |
archive -archivePath $ARCHIVE_PATH -allowProvisioningUpdates | |
PROVISIONING_STYLE="Manual" \ | |
PROVISIONING_PROFILE={$APPLE_ONELOCAL_DISTRIBUTION_CERTIFICATE} \ | |
CODE_SIGN_STYLE="Manual" \ | |
CODE_SIGN_IDENTITY={$APPLE_ONELOCAL_DISTRIBUTION_CERTIFICATE} \ | |
- name: Export STAGING | |
run: | | |
xcodebuild -exportArchive -archivePath $ARCHIVE_PATH -exportPath $EXPORT_PATH_STAGING . -exportOptionsPlist $PLIST_PATH_STAGING \ | |
- name: Export PROD | |
run: | | |
xcodebuild -exportArchive -archivePath $ARCHIVE_PATH -exportPath $EXPORT_PATH_PROD . -exportOptionsPlist $PLIST_PATH_PROD \ | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ env.ARTIFACT_NAME }} | |
path: | | |
${{ env.ARTIFACT_PATH_STAGING }} | |
${{ env.ARTIFACT_PATH_PROD }} | |
- name: Clean up keychain and provisioning profile | |
if: ${{ always() }} | |
run: | | |
security delete-keychain $RUNNER_TEMP/app-signing.keychain-db | |
rm ~/Library/MobileDevice/Provisioning\ Profiles/dist_pp.mobileprovision | |
rm ~/Library/MobileDevice/Provisioning\ Profiles/dist_pp_adc.mobileprovision | |
deploy: | |
needs: [build] | |
if: success() | |
name: Deploy | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@master | |
- uses: actions/actions/download-artifact@v3 | |
with: | |
name: ${{ env.ARTIFACT_NAME }} | |
- name: set up JDK 17.0.10 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 17.0.10 | |
- name: Upload to App Center STAGING | |
uses: wzieba/AppCenter-Github-Action@v1 | |
with: | |
appName: ${{ env.APP_NAME_STAGING }} | |
token: ${{ env.APP_CENTER_TOKEN_STAGING }} | |
group: ${{ env.TESTING_GROUP_STAGING }} | |
file: ${{ env.UPLOAD_FILE_STAGING }} | |
notifyTesters: true | |
debug: false | |
- name: Upload to App Center PROD | |
uses: wzieba/AppCenter-Github-Action@v1 | |
with: | |
appName: ${{ env.APP_NAME_PROD }} | |
token: ${{ env.APP_CENTER_TOKEN_PROD }} | |
group: ${{ env.TESTING_GROUP_PROD }} | |
file: ${{ env.UPLOAD_FILE_PROD }} | |
notifyTesters: false | |
debug: false | |
- name: Delete Artifact | |
uses: geekyeggo/delete-artifact@v1 | |
with: | |
name: ${{ env.ARTIFACT_NAME }} |