Update readme with new status badges #4
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 | |
on: | |
push: | |
branches: [ main ] | |
jobs: | |
build-and-deploy: | |
runs-on: macos-14 | |
timeout-minutes: 20 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install provisioning profile | |
run: | | |
gpg --quiet --batch --yes --decrypt \ | |
--passphrase="${{ secrets.PROFILE_PASSPHRASE }}" \ | |
--output .github/deployment/EssentialAppDistributionProfile.mobileprovision .github/deployment/EssentialAppDistributionProfile.mobileprovision.gpg | |
mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles | |
cp .github/deployment/EssentialAppDistributionProfile.mobileprovision ~/Library/MobileDevice/Provisioning\ Profiles/ | |
- name: Install keychain certificate | |
run: | | |
gpg --quiet --batch --yes --decrypt \ | |
--passphrase="${{ secrets.CERTIFICATE_PASSPHRASE }}" \ | |
--output .github/deployment/EssentialAppDistributionCertificate.p12 .github/deployment/EssentialAppDistributionCertificate.p12.gpg | |
security create-keychain -p "" build.keychain | |
security import .github/deployment/EssentialAppDistributionCertificate.p12 -t agg -k ~/Library/Keychains/build.keychain -P "${{ secrets.CERTIFICATE_PASSWORD }}" -A | |
security list-keychains -s ~/Library/Keychains/build.keychain | |
security default-keychain -s ~/Library/Keychains/build.keychain | |
security unlock-keychain -p "" ~/Library/Keychains/build.keychain | |
security set-key-partition-list -S apple-tool:,apple: -s -k "" ~/Library/Keychains/build.keychain | |
- name: Select Xcode | |
run: sudo xcode-select -switch /Applications/Xcode_15.2.app | |
- name: Xcode version | |
run: xcodebuild -version | |
- name: Bump build number | |
run: | | |
buildNumber=$(($GITHUB_RUN_NUMBER + 2)) | |
cd EssentialApp/ | |
agvtool new-version $buildNumber | |
- name: Build | |
run: | | |
xcodebuild clean archive \ | |
-sdk iphoneos \ | |
-workspace EssentialApp/EssentialApp.xcworkspace \ | |
-configuration "Release" \ | |
-scheme "EssentialApp" \ | |
-derivedDataPath "DerivedData" \ | |
-archivePath "DerivedData/Archive/EssentialApp.xcarchive" | xcbeautify | |
- name: Export | |
run: | | |
xcodebuild \ | |
-exportArchive \ | |
-archivePath DerivedData/Archive/EssentialApp.xcarchive \ | |
-exportOptionsPlist .github/deployment/ExportOptions.plist \ | |
-exportPath DerivedData/ipa | xcbeautify | |
- name: Deploy | |
run: | | |
xcrun altool \ | |
--upload-app \ | |
--type ios \ | |
--file "DerivedData/ipa/EssentialApp.ipa" --username "${{ secrets.APPSTORE_USERNAME }}" --password "${{ secrets.APPSTORE_PASSWORD }}" |