Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 70 additions & 0 deletions .github/actions/ios-signing/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# GitHub Secrets의 인증서·프로비저닝 프로파일을 임시 keychain에 설치하고 ExportOptions.plist를 만든다.
name: iOS signing
description: Install signing certificate and provisioning profile, write ExportOptions.plist

inputs:
certificate-base64:
required: true
certificate-password:
required: true
profile-base64:
required: true
bundle-id:
required: true
team-id:
required: true

outputs:
export-options:
description: Path to the generated ExportOptions.plist
value: ${{ steps.sign.outputs.export-options }}

runs:
using: composite
steps:
- id: sign
shell: bash
env:
CERT: ${{ inputs.certificate-base64 }}
CERT_PASSWORD: ${{ inputs.certificate-password }}
PROFILE: ${{ inputs.profile-base64 }}
BUNDLE_ID: ${{ inputs.bundle-id }}
TEAM_ID: ${{ inputs.team-id }}
run: |
set -euo pipefail
KEYCHAIN="$RUNNER_TEMP/app-signing.keychain-db"
KEYCHAIN_PASSWORD="$(openssl rand -base64 24)"

echo -n "$CERT" | base64 --decode > "$RUNNER_TEMP/cert.p12"
echo -n "$PROFILE" | base64 --decode > "$RUNNER_TEMP/profile.mobileprovision"

security create-keychain -p "$KEYCHAIN_PASSWORD" "$KEYCHAIN"
security set-keychain-settings -lut 21600 "$KEYCHAIN"
security unlock-keychain -p "$KEYCHAIN_PASSWORD" "$KEYCHAIN"
security import "$RUNNER_TEMP/cert.p12" -P "$CERT_PASSWORD" -A -t cert -f pkcs12 -k "$KEYCHAIN"
security set-key-partition-list -S apple-tool:,apple: -k "$KEYCHAIN_PASSWORD" "$KEYCHAIN"
security list-keychain -d user -s "$KEYCHAIN"

security cms -D -i "$RUNNER_TEMP/profile.mobileprovision" > "$RUNNER_TEMP/profile.plist"
UUID="$(/usr/libexec/PlistBuddy -c 'Print UUID' "$RUNNER_TEMP/profile.plist")"
NAME="$(/usr/libexec/PlistBuddy -c 'Print Name' "$RUNNER_TEMP/profile.plist")"
mkdir -p "$HOME/Library/MobileDevice/Provisioning Profiles"
cp "$RUNNER_TEMP/profile.mobileprovision" "$HOME/Library/MobileDevice/Provisioning Profiles/$UUID.mobileprovision"

EXPORT_OPTIONS="$RUNNER_TEMP/ExportOptions.plist"
cat > "$EXPORT_OPTIONS" <<EOF
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>method</key><string>app-store-connect</string>
<key>teamID</key><string>$TEAM_ID</string>
<key>signingStyle</key><string>manual</string>
<key>provisioningProfiles</key>
<dict>
<key>$BUNDLE_ID</key><string>$NAME</string>
</dict>
</dict>
</plist>
EOF
echo "export-options=$EXPORT_OPTIONS" >> "$GITHUB_OUTPUT"
114 changes: 114 additions & 0 deletions .github/workflows/app-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
# develop/main merge 시 Shorebird release 빌드 → Fastlane 업로드(재빌드 X) → TestFlight / Play 내부 테스트.
# develop → dev(com.ject.highfive.dev), main → prod(com.ject.highfive).
# 스토어 출시(App Store 심사, Google Play 검토)는 prod만, 콘솔에서 수동 승인.
# PR 검사는 mobile.yml / web.yml이 맡는다.
name: App Release

on:
push:
branches: [develop, main]
paths:
- 'apps/mobile/**'
workflow_dispatch:

concurrency:
group: app-release-${{ github.ref }}
cancel-in-progress: false

env:
FLAVOR: ${{ github.ref_name == 'main' && 'prod' || 'dev' }}
APP_ID: ${{ github.ref_name == 'main' && 'com.ject.highfive' || 'com.ject.highfive.dev' }}
BUILD_NUMBER: ${{ github.run_number }}

jobs:
android:
runs-on: ubuntu-latest
defaults:
run:
working-directory: apps/mobile
steps:
- uses: actions/checkout@v5
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
- uses: shorebirdtech/setup-shorebird@v1
with:
cache: true
- name: Android signing
env:
KEYSTORE_BASE64: ${{ secrets.ANDROID_KEYSTORE_BASE64 }}
KEYSTORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }}
KEY_ALIAS: ${{ secrets.ANDROID_KEY_ALIAS }}
KEY_PASSWORD: ${{ secrets.ANDROID_KEY_PASSWORD }}
run: |
echo -n "$KEYSTORE_BASE64" | base64 --decode > android/app/upload-keystore.jks
cat > android/key.properties <<EOF
storeFile=upload-keystore.jks
storeType=PKCS12
storePassword=$KEYSTORE_PASSWORD
keyAlias=$KEY_ALIAS
keyPassword=$KEY_PASSWORD
EOF
- name: Shorebird release
env:
SHOREBIRD_TOKEN: ${{ secrets.SHOREBIRD_TOKEN }}
run: |
shorebird release android \
--flavor "$FLAVOR" \
--flutter-version "$(jq -r .flutter .fvmrc)" \
-- --build-number="$BUILD_NUMBER"
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3'
bundler-cache: true
working-directory: apps/mobile
- name: Upload to Play internal testing
env:
PLAY_SERVICE_ACCOUNT_JSON: ${{ secrets.PLAY_SERVICE_ACCOUNT_JSON }}
run: |
bundle exec fastlane android upload_internal \
aab:"build/app/outputs/bundle/${FLAVOR}Release/app-${FLAVOR}-release.aab" \
package_name:"$APP_ID"

ios:
runs-on: macos-latest
defaults:
run:
working-directory: apps/mobile
steps:
- uses: actions/checkout@v5
- uses: shorebirdtech/setup-shorebird@v1
with:
cache: true
- id: signing
uses: ./.github/actions/ios-signing
with:
certificate-base64: ${{ secrets.IOS_DISTRIBUTION_P12_BASE64 }}
certificate-password: ${{ secrets.IOS_P12_PASSWORD }}
profile-base64: ${{ env.FLAVOR == 'prod' && secrets.IOS_PROFILE_PROD_BASE64 || secrets.IOS_PROFILE_DEV_BASE64 }}
bundle-id: ${{ env.APP_ID }}
team-id: Q4E6NKD9VN
- name: Shorebird release
env:
SHOREBIRD_TOKEN: ${{ secrets.SHOREBIRD_TOKEN }}
run: |
shorebird release ios \
--flavor "$FLAVOR" \
--flutter-version "$(jq -r .flutter .fvmrc)" \
--export-options-plist "${{ steps.signing.outputs.export-options }}" \
-- --build-number="$BUILD_NUMBER"
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3'
bundler-cache: true
working-directory: apps/mobile
- name: Upload to TestFlight
env:
ASC_KEY_ID: ${{ secrets.ASC_KEY_ID }}
ASC_ISSUER_ID: ${{ secrets.ASC_ISSUER_ID }}
ASC_KEY_P8: ${{ secrets.ASC_KEY_P8 }}
run: |
bundle exec fastlane ios upload_testflight \
ipa:"$(ls build/ios/ipa/*.ipa | head -1)" \
app_identifier:"$APP_ID"
85 changes: 85 additions & 0 deletions .github/workflows/shorebird-patch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# 긴급 수정 · Shorebird patch (Dart 코드만). Actions 탭에서 수동 실행.
# patch는 staging 트랙에 올라간다 → 검증 후 Shorebird 콘솔에서 stable로 수동 게시(rollback 가능).
# 네이티브 · 권한 · SDK · 에셋 변경은 patch 불가 → 앱 release로 배포.
name: Shorebird Patch

on:
workflow_dispatch:
inputs:
flavor:
description: Flavor
type: choice
options: [prod, dev]
required: true
platform:
description: Platform
type: choice
options: [both, android, ios]
required: true
release_version:
description: Target release version (e.g. 1.0.0+42, Shorebird 콘솔에서 확인)
type: string
required: true

concurrency:
group: shorebird-patch-${{ inputs.flavor }}
cancel-in-progress: false

env:
FLAVOR: ${{ inputs.flavor }}
APP_ID: ${{ inputs.flavor == 'prod' && 'com.ject.highfive' || 'com.ject.highfive.dev' }}
RELEASE_VERSION: ${{ inputs.release_version }}

jobs:
android:
if: inputs.platform != 'ios'
runs-on: ubuntu-latest
defaults:
run:
working-directory: apps/mobile
steps:
- uses: actions/checkout@v5
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
- uses: shorebirdtech/setup-shorebird@v1
with:
cache: true
- name: Shorebird patch
env:
SHOREBIRD_TOKEN: ${{ secrets.SHOREBIRD_TOKEN }}
run: |
shorebird patch android \
--flavor "$FLAVOR" \
--release-version "$RELEASE_VERSION" \
--track staging

ios:
if: inputs.platform != 'android'
runs-on: macos-latest
defaults:
run:
working-directory: apps/mobile
steps:
- uses: actions/checkout@v5
- uses: shorebirdtech/setup-shorebird@v1
with:
cache: true
- id: signing
uses: ./.github/actions/ios-signing
with:
certificate-base64: ${{ secrets.IOS_DISTRIBUTION_P12_BASE64 }}
certificate-password: ${{ secrets.IOS_P12_PASSWORD }}
profile-base64: ${{ env.FLAVOR == 'prod' && secrets.IOS_PROFILE_PROD_BASE64 || secrets.IOS_PROFILE_DEV_BASE64 }}
bundle-id: ${{ env.APP_ID }}
team-id: Q4E6NKD9VN
- name: Shorebird patch
env:
SHOREBIRD_TOKEN: ${{ secrets.SHOREBIRD_TOKEN }}
run: |
shorebird patch ios \
--flavor "$FLAVOR" \
--release-version "$RELEASE_VERSION" \
--export-options-plist "${{ steps.signing.outputs.export-options }}" \
--track staging
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,13 @@
.idea/
*.iml
.omo/

# 서명 파일 (git에 넣지 않는다)
*.p12
*.cer
*.p8
*.mobileprovision
*.jks
*.keystore
**/key.properties
비밀번호.txt
1 change: 1 addition & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
| 웹 폴더 구조·의존성·bridge·환경 | [docs/web-architecture.md](./docs/web-architecture.md) |
| 색·간격·글자 크기 값과 바꾸는 절차 | [docs/design-tokens.md](./docs/design-tokens.md) |
| PR 올리기 전·리뷰할 때 무엇을 왜 보나 | [docs/pr-checklist.md](./docs/pr-checklist.md) |
| 배포(TestFlight·Play)·Shorebird patch·서명 secret | [docs/ci-cd.md](./docs/ci-cd.md) |

## 저장소와 명령

Expand Down
3 changes: 3 additions & 0 deletions apps/mobile/Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source "https://rubygems.org"

gem "fastlane"
Loading
Loading