Skip to content

Test: 워크플로우 테스트 pr #195

Test: 워크플로우 테스트 pr

Test: 워크플로우 테스트 pr #195

Workflow file for this run

name: Build Test
on:
pull_request:
branches:
- develop
workflow_dispatch:
jobs:
build:
runs-on: macos-26
timeout-minutes: 60
env:
# Team IDs
DEVELOPMENT_TEAM: ${{ secrets.DEVELOPMENT_TEAM }}
# Match (Code Signing)
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
MATCH_KEYCHAIN_NAME: fastlane_tmp.keychain-db
MATCH_GIT_PRIVATE_KEY: ${{ secrets.MATCH_GIT_PRIVATE_KEY }}
# Fastlane
FASTLANE_XCODEBUILD_SETTINGS_TIMEOUT: '120'
FASTLANE_XCODE_LIST_TIMEOUT: '120'
FASTLANE_DISABLE_COLORS: 'true'
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3'
bundler-cache: true
- name: Setup SSH for Match
if: env.MATCH_GIT_PRIVATE_KEY != ''
run: |
mkdir -p "$HOME/.ssh"
echo -e "$MATCH_GIT_PRIVATE_KEY" > "$HOME/.ssh/match_git_key"
chmod 600 "$HOME/.ssh/match_git_key"
eval "$(ssh-agent -s)"
ssh-add "$HOME/.ssh/match_git_key"
ssh-keyscan -H github.com >> "$HOME/.ssh/known_hosts"
cat >> "$HOME/.ssh/config" << EOF
Host github.com
IdentityFile ~/.ssh/match_git_key
StrictHostKeyChecking yes
User git
EOF
- name: Setup SSH for Private repo
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.SSH_KEY }}
known_hosts: unnecessary
- name: Setup keychain
if: env.MATCH_PASSWORD != ''
run: |
security create-keychain -p "$MATCH_PASSWORD" "$MATCH_KEYCHAIN_NAME"
security set-keychain-settings -lut 21600 "$MATCH_KEYCHAIN_NAME"
security unlock-keychain -p "$MATCH_PASSWORD" "$MATCH_KEYCHAIN_NAME"
existing_keychains=$(security list-keychains | tr -d '"')
security list-keychains -s "$MATCH_KEYCHAIN_NAME" $existing_keychains
security default-keychain -s "$MATCH_KEYCHAIN_NAME"
- name: Setup mise
run: |
curl https://mise.jdx.dev/install.sh | sh
echo "$HOME/.local/share/mise/bin" >> $GITHUB_PATH
echo "$HOME/.local/share/mise/shims" >> $GITHUB_PATH
- name: Install Tuist
run: mise install tuist
- name: Setup code signing
run: bundle exec fastlane development_profile
- name: Generate project with Tuist
run: make test
- name: Build Test
run: bundle exec fastlane build
- name: Upload logs on failure
if: failure()
uses: actions/upload-artifact@v4
with:
name: build-logs
path: |
~/Library/Logs/gym
~/Library/Developer/Xcode/DerivedData
if-no-files-found: ignore
retention-days: 3
- name: Cleanup
if: always()
run: |
# SSH cleanup
if [ -n "$MATCH_GIT_PRIVATE_KEY" ]; then
ssh-add -D >/dev/null 2>&1 || true
rm -f "$HOME/.ssh/match_git_key"
fi
# Keychain cleanup
if [ -n "$MATCH_PASSWORD" ]; then
security delete-keychain "$MATCH_KEYCHAIN_NAME" 2>/dev/null || true
fi