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
56 changes: 20 additions & 36 deletions .github/actions/setup-build-env/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ inputs:
keychain-password:
description: "Keychain password"
required: true
install-swiftlint:
description: "Whether to install SwiftLint"
required: false
default: "true"
include-pulse:
description: "Whether to include Pulse in cache (false for production builds)"
required: false
Expand Down Expand Up @@ -39,17 +35,29 @@ runs:
ruby-version: "3.3.0"
bundler-cache: true

- name: 📦 Cache Tuist binary
id: tuist-binary-cache
uses: actions/cache@v4
with:
path: ~/.tuist-bin
key: tuist-binary-${{ runner.os }}-4.118.0

- name: 🛠 Install Tuist (manual binary)
if: steps.tuist-binary-cache.outputs.cache-hit != 'true'
shell: bash
run: |
TUIST_VERSION=4.118.0
mkdir -p ~/.tuist-bin
curl -L "https://github.com/tuist/tuist/releases/download/${TUIST_VERSION}/tuist.zip" -o tuist.zip
unzip -o tuist.zip -d ~/.tuist-bin
chmod +x ~/.tuist-bin/tuist
echo "$HOME/.tuist-bin" >> $GITHUB_PATH

- name: 🔧 Add Tuist to PATH
shell: bash
run: echo "$HOME/.tuist-bin" >> $GITHUB_PATH

- name: 📦 Cache SPM dependencies
id: spm-cache
uses: actions/cache@v4
with:
path: Tuist/.build
Expand All @@ -58,49 +66,25 @@ runs:
tuist-spm-${{ runner.os }}-

- name: 🛠 Install tuist dependencies
if: steps.spm-cache.outputs.cache-hit != 'true'
shell: bash
run: tuist install

- name: 📦 Cache Tuist build artifacts
id: tuist-cache
uses: actions/cache@v4
with:
path: ~/.cache/tuist
key: tuist-build-cache-${{ runner.os }}-${{ inputs.include-pulse }}-${{ hashFiles('Tuist/Package.resolved', 'Tuist/Package.swift') }}
restore-keys: |
tuist-build-cache-${{ runner.os }}-${{ inputs.include-pulse }}-

- name: 📊 Tuist cache status
- name: 📊 SPM cache status
shell: bash
run: |
if [ "${{ steps.tuist-cache.outputs.cache-hit }}" == "true" ]; then
echo "✅ Tuist cache HIT"
if [ "${{ steps.spm-cache.outputs.cache-hit }}" == "true" ]; then
echo "✅ SPM cache HIT - skipping tuist cache warm up"
else
echo "❌ Tuist cache MISS - will build dependencies"
echo "❌ SPM cache MISS - will build dependencies"
fi

- name: 🏗 Warm up external dependencies (with Pulse)
if: ${{ inputs.include-pulse == 'true' }}
if: steps.spm-cache.outputs.cache-hit != 'true' && inputs.include-pulse == 'true'
shell: bash
run: tuist cache ComposableArchitecture Kingfisher Pulse KakaoSDKAuth KakaoSDKCommon GoogleSignIn GoogleSignInSwift

- name: 🏗 Warm up external dependencies (without Pulse)
if: ${{ inputs.include-pulse != 'true' }}
if: steps.spm-cache.outputs.cache-hit != 'true' && inputs.include-pulse != 'true'
shell: bash
run: tuist cache ComposableArchitecture Kingfisher KakaoSDKAuth KakaoSDKCommon GoogleSignIn GoogleSignInSwift

- name: 📦 Cache SwiftLint
if: ${{ inputs.install-swiftlint == 'true' }}
uses: actions/cache@v4
with:
path: /opt/homebrew/bin/swiftlint
key: swiftlint-${{ runner.os }}-0.57.0

- name: 🧰 Install SwiftLint
if: ${{ inputs.install-swiftlint == 'true' }}
shell: bash
run: |
if ! command -v swiftlint &> /dev/null; then
brew install swiftlint
fi
swiftlint version
106 changes: 0 additions & 106 deletions .github/scripts/create-notion-page.js

This file was deleted.

12 changes: 11 additions & 1 deletion .github/workflows/cd_develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,22 @@ jobs:
steps:
- name: 🔄 Checkout source code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: 🛠 Setup Build Environment
uses: ./.github/actions/setup-build-env
with:
keychain-name: ${{ secrets.KEYCHAIN_NAME }}
keychain-password: ${{ secrets.KEYCHAIN_PASSWORD }}
install-swiftlint: "false"

- name: 📦 Cache DerivedData
uses: actions/cache@v4
with:
path: ~/Library/Developer/Xcode/DerivedData
key: deriveddata-${{ runner.os }}-${{ hashFiles('Tuist/Package.resolved') }}
restore-keys: |
deriveddata-${{ runner.os }}-

- name: 🚀 Deploy to TestFlight (TwixDebug)
env:
Expand All @@ -37,6 +46,7 @@ jobs:
ASC_KEY_ID: ${{ secrets.ASC_KEY_ID }}
ASC_ISSUER_ID: ${{ secrets.ASC_ISSUER_ID }}
ASC_KEY_P8_BASE64: ${{ secrets.ASC_KEY_P8_BASE64 }}
GITHUB_RUN_NUMBER: ${{ github.run_number }}
run: bundle exec fastlane deploy_develop

- name: 🧹 Teardown()
Expand Down
12 changes: 11 additions & 1 deletion .github/workflows/cd_main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,24 @@ jobs:
steps:
- name: 🔄 Checkout source code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: 🛠 Setup Build Environment
uses: ./.github/actions/setup-build-env
with:
keychain-name: ${{ secrets.KEYCHAIN_NAME }}
keychain-password: ${{ secrets.KEYCHAIN_PASSWORD }}
install-swiftlint: "false"
include-pulse: "false"

- name: 📦 Cache DerivedData
uses: actions/cache@v4
with:
path: ~/Library/Developer/Xcode/DerivedData
key: deriveddata-${{ runner.os }}-${{ hashFiles('Tuist/Package.resolved') }}
restore-keys: |
deriveddata-${{ runner.os }}-

- name: 🚀 Deploy to App Store Connect (Twix)
env:
MATCH_REPO_URL: ${{ secrets.MATCH_REPO_URL }}
Expand All @@ -38,6 +47,7 @@ jobs:
ASC_KEY_ID: ${{ secrets.ASC_KEY_ID }}
ASC_ISSUER_ID: ${{ secrets.ASC_ISSUER_ID }}
ASC_KEY_P8_BASE64: ${{ secrets.ASC_KEY_P8_BASE64 }}
GITHUB_RUN_NUMBER: ${{ github.run_number }}
run: bundle exec fastlane deploy_main

- name: 🧹 Teardown()
Expand Down
15 changes: 13 additions & 2 deletions .github/workflows/ci_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@ name: Fastlane CI (PR)
on:
pull_request:

concurrency:
group: ci-pr-${{ github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
ci_pr:
build:
runs-on: macos-15
steps:
- name: 🔄 Checkout source code
Expand All @@ -15,7 +19,14 @@ jobs:
with:
keychain-name: ${{ secrets.KEYCHAIN_NAME }}
keychain-password: ${{ secrets.KEYCHAIN_PASSWORD }}
install-swiftlint: "true"

- name: 📦 Cache DerivedData
uses: actions/cache@v4
with:
path: ~/Library/Developer/Xcode/DerivedData
key: deriveddata-${{ runner.os }}-${{ hashFiles('Tuist/Package.resolved') }}
restore-keys: |
deriveddata-${{ runner.os }}-

- name: 🧪 Run PR Checks (build + test)
env:
Expand Down
30 changes: 0 additions & 30 deletions .github/workflows/create-notion-page.yml

This file was deleted.

10 changes: 8 additions & 2 deletions .github/workflows/issue-automation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,21 @@ jobs:
let type = (m?.[1] ?? "chore").toLowerCase();
if (!allowed.has(type)) type = "chore";
const branchName = `${type}/#${issueNumber}`;
// Parse Linear issue ID from title (e.g., [TWI-123])
const linearMatch = title.match(/\[(TWI-\d+)\]/);
const linearId = linearMatch?.[1];
const branchName = linearId
? `${type}/#${issueNumber}/${linearId}`
: `${type}/#${issueNumber}`;
console.log(`🌿 Target branch: ${branchName}`);
// base branch SHA
const { data: repo } = await github.rest.repos.get({
owner: context.repo.owner,
repo: context.repo.repo,
});
const baseBranch = repo.default_branch;
const baseBranch = 'develop';
const { data: baseRef } = await github.rest.git.getRef({
owner: context.repo.owner,
Expand Down
16 changes: 6 additions & 10 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -170,11 +170,9 @@ platform :ios do
is_key_content_base64: true
)

current_build = latest_testflight_build_number(
api_key: api_key,
app_identifier: BUNDLE_ID
)
new_build = current_build + 1
commit_count = sh("git rev-list --count HEAD").strip.to_i
run_number = (ENV["GITHUB_RUN_NUMBER"] || "0").to_i
new_build = commit_count * 100 + (run_number % 100)

sh("cd .. && /usr/libexec/PlistBuddy -c 'Set :CFBundleVersion #{new_build}' Projects/App/Derived/InfoPlists/TwixDebug-Info.plist")

Expand Down Expand Up @@ -209,11 +207,9 @@ platform :ios do
is_key_content_base64: true
)

current_build = latest_testflight_build_number(
api_key: api_key,
app_identifier: BUNDLE_ID
)
new_build = current_build + 1
commit_count = sh("git rev-list --count HEAD").strip.to_i
run_number = (ENV["GITHUB_RUN_NUMBER"] || "0").to_i
new_build = commit_count * 100 + (run_number % 100)

sh("cd .. && /usr/libexec/PlistBuddy -c 'Set :CFBundleVersion #{new_build}' Projects/App/Derived/InfoPlists/Twix-Info.plist")

Expand Down
Loading