Skip to content

TestFlight 배포 CD 변경 #263

TestFlight 배포 CD 변경

TestFlight 배포 CD 변경 #263

Workflow file for this run

name: build
env:
PROJECT: 'Favor'
XC_PROJECT: ${{ 'Favor/Favor.xcodeproj' }}
on:
pull_request:
branches: [ main, dev ]
merge_group:
jobs:
build:
runs-on: macos-13
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Create secret file
env:
API_SECRET: ${{ secrets.API_SECRET }}
TERM_SECRET: ${{ secrets.TERM_SECRET }}
run: |
echo $API_SECRET | base64 -D -o ${{ env.PROJECT }}/${{ env.PROJECT }}NetworkKit/Sources/${{ env.PROJECT }}NetworkKit/API-Info.plist
echo $TERM_SECRET | base64 -D -o ${{ env.PROJECT }}/${{ env.PROJECT }}/Term-Info.plist
- name: Setup Build Certificates
env:
BUILD_CERTIFICATE_BASE64: ${{ secrets.IOS_BUILD_CERTIFICATE_BASE64 }}
P12_PASSWORD: ${{ secrets.IOS_P12_PASSWORD }}
BUILD_PROVISION_PROFILE_BASE64: ${{ secrets.IOS_BUILD_PROVISION_PROFILE_BASE64 }}
KEYCHAIN_PASSWORD: ${{ secrets.IOS_KEYCHAIN_PASSWORD }}
run: |
CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12
PROFILE_PATH=$RUNNER_TEMP/build_pp.mobileprovision
KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db
echo -n "$BUILD_CERTIFICATE_BASE64" | base64 --decode -o $CERTIFICATE_PATH
echo -n "$BUILD_PROVISION_PROFILE_BASE64" | base64 --decode -o $PROFILE_PATH
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 $PROFILE_PATH ~/Library/MobileDevice/Provisioning\ Profiles
- name: Setup Xcode
if: ${{ !env.ACT }}
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '15.0.1'
- name: Build
env:
XCODEPROJ: "${{ env.PROJECT }}/${{ env.PROJECT }}.xcodeproj"
run: |
xcodebuild \
-project ${{ env.XCODEPROJ }} \
clean build