Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/baekteun/TodayWhat-new in…
Browse files Browse the repository at this point in the history
…to 152-settings-school-block-missing
  • Loading branch information
baekteun committed Sep 21, 2024
2 parents 7417957 + cdf8dea commit 3e1fab8
Show file tree
Hide file tree
Showing 15 changed files with 101 additions and 205 deletions.
23 changes: 7 additions & 16 deletions .github/workflows/AppStore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,6 @@ env:
ENCRYPTED_IOS_GOOGLE_SERVICE_PLIST_PATH: ${{ 'Projects/App/iOS/Resources/GoogleService-Info.plist.gpg' }}
DECRYPTED_IOS_GOOGLE_SERVICE_PLIST_PATH: ${{ 'Projects/App/iOS/Resources/GoogleService-Info.plist' }}

STAGE_PROVISION_SECRET: ${{ secrets.STAGE_PROVISION_SECRET }}
ENCRYPTED_STAGE_PROVISION_PATH: ${{ 'Tuist/Signing/StageProvisionProfile.zip.gpg' }}
DECRYPTED_STAGE_PROVISION_PATH: ${{ 'Tuist/Signing/StageProvisionProfile.zip' }}

PROD_PROVISION_SECRET: ${{ secrets.PROD_PROVISION_SECRET }}
ENCRYPTED_PROD_PROVISION_PATH: ${{ 'Tuist/Signing/ProdProvisionProfile.zip.gpg' }}
DECRYPTED_PROD_PROVISION_PATH: ${{ 'Tuist/Signing/ProdProvisionProfile.zip' }}

MASTER_KEY_SECRET: ${{ secrets.MASTER_KEY_SECRET }}
ENCRYPTED_MASTER_KEY_PATH: ${{ 'Tuist/master.key.gpg' }}
DECRYPTED_MASTER_KEY_PATH: ${{ 'Tuist/master.key' }}

FASTLANE_SECRET: ${{ secrets.FASTLANE_SECRET }}
ENCRYPTED_FASTLANE_ENV_PATH: ${{ 'fastlane/.env.default.gpg' }}
DECRYPTED_FASTLANE_ENV_PATH: ${{ 'fastlane/.env.default' }}
Expand All @@ -58,6 +46,10 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.MATCH_SSH_PRIVATE_KEY }}

- name: Decode encrypted files
run: sh .github/workflows/AppStore/Decode.sh
shell: bash
Expand All @@ -67,10 +59,6 @@ jobs:
- name: Install tuist
run: mise install tuist

- name: Configure Keychain
run: sh .github/workflows/AppStore/Keychain.sh
shell: bash

- name: Install fastlane
run: brew install fastlane

Expand All @@ -95,6 +83,9 @@ jobs:
run: sh .github/workflows/AppStore/Deploy.sh
shell: bash
env:
FASTLANE_PASSWORD: ${{ secrets.FASTLANE_PASSWORD }}
MATCH_KEYCHAIN_PASSWORD: ${{ secrets.MATCH_KEYCHAIN_PASSWORD }}
MATCH_PASSWORD: ${{ secrets.MATCH_PASSPHRASE }}
VERSION: ${{ github.event.inputs.version }}
PLATFORM: ${{ github.event.inputs.platform }}

Expand Down
12 changes: 0 additions & 12 deletions .github/workflows/AppStore/Decode.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,6 @@ rm -rf XCConfig.zip
# GoogleService-Info.plist
gpg -d -o "$DECRYPTED_IOS_GOOGLE_SERVICE_PLIST_PATH" --pinentry-mode=loopback --passphrase "$IOS_GOOGLE_SERVICE_PLIST_SECRET" "$ENCRYPTED_IOS_GOOGLE_SERVICE_PLIST_PATH"

# Provisioning Profile
gpg -d -o "$DECRYPTED_STAGE_PROVISION_PATH" --pinentry-mode=loopback --passphrase "$STAGE_PROVISION_SECRET" "$ENCRYPTED_STAGE_PROVISION_PATH"
unzip Tuist/Signing/StageProvisionProfile.zip -d Tuist/Signing
mv -v Tuist/Signing/StageProvisionProfile/* Tuist/Signing/

gpg -d -o "$DECRYPTED_PROD_PROVISION_PATH" --pinentry-mode=loopback --passphrase "$PROD_PROVISION_SECRET" "$ENCRYPTED_PROD_PROVISION_PATH"
unzip Tuist/Signing/ProdProvisionProfile.zip -d Tuist/Signing
mv -v Tuist/Signing/ProdProvisionProfile/* Tuist/Signing/

# master.key
gpg -d -o "$DECRYPTED_MASTER_KEY_PATH" --pinentry-mode=loopback --passphrase "$MASTER_KEY_SECRET" "$ENCRYPTED_MASTER_KEY_PATH"

# fastlane env
gpg -d -o "$DECRYPTED_FASTLANE_ENV_PATH" --pinentry-mode=loopback --passphrase "$FASTLANE_SECRET" "$ENCRYPTED_FASTLANE_ENV_PATH"

Expand Down
25 changes: 1 addition & 24 deletions .github/workflows/AppStore/Keychain.sh
Original file line number Diff line number Diff line change
@@ -1,29 +1,6 @@
#!/bin/bash

security create-keychain -p "" "$KEYCHAIN"
security list-keychains -s "$KEYCHAIN"
security default-keychain -s "$KEYCHAIN"
security unlock-keychain -p "" "$KEYCHAIN"
security set-keychain-settings -lut 3600
security list-keychains

tuist signing decrypt
security import "Tuist/Signing/TodayWhat.p12" -k "$KEYCHAIN" -P "$CERTS_EXPORT_PWD" -A
security set-key-partition-list -S apple-tool:,apple: -s -k "" "$KEYCHAIN"

mkdir -p "$HOME/Library/MobileDevice/Provisioning Profiles"
cd "Tuist/Signing"

echo `ls *.mobileprovision`
for PROVISION in `ls *.mobileprovision`
do
UUID=`/usr/libexec/PlistBuddy -c 'Print :UUID' /dev/stdin <<< $(security cms -D -i ./$PROVISION)`
cp "./$PROVISION" "$HOME/Library/MobileDevice/Provisioning Profiles/$UUID.mobileprovision"
done

echo `ls *.provisionprofile`
for PROVISION in `ls *.provisionprofile`
do
UUID=`/usr/libexec/PlistBuddy -c 'Print :UUID' /dev/stdin <<< $(security cms -D -i ./$PROVISION)`
cp "./$PROVISION" "$HOME/Library/MobileDevice/Provisioning Profiles/$UUID.provisionprofile"
done
security list-keychains
7 changes: 0 additions & 7 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ env:
CACHED_DEPENDENCY_PATHS: ${{ github.workspace }}/Tuist/Dependencies
TODAYWHAT_IOS_DISCORD_WEBHOOK: ${{ secrets.TODAYWHAT_IOS_DISCORD_WEBHOOK }}

MASTER_KEY_SECRET: ${{ secrets.MASTER_KEY_SECRET }}
ENCRYPTED_MASTER_KEY_PATH: ${{ 'Tuist/master.key.gpg' }}
DECRYPTED_MASTER_KEY_PATH: ${{ 'Tuist/master.key' }}

jobs:
prepare-dependency:
name: ⚙️ Prepare for CI
Expand Down Expand Up @@ -58,9 +54,6 @@ jobs:
with:
xcode-version: 15.2

- name: Decode `master.key`
run: gpg -d -o "$DECRYPTED_MASTER_KEY_PATH" --pinentry-mode=loopback --passphrase "$MASTER_KEY_SECRET" "$ENCRYPTED_MASTER_KEY_PATH"

- name: Check dependency cache
uses: actions/cache@v3
id: cache_dependencies
Expand Down
34 changes: 14 additions & 20 deletions .github/workflows/TestFlight.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,6 @@ env:
ENCRYPTED_IOS_GOOGLE_SERVICE_PLIST_PATH: ${{ 'Projects/App/iOS/Resources/GoogleService-Info.plist.gpg' }}
DECRYPTED_IOS_GOOGLE_SERVICE_PLIST_PATH: ${{ 'Projects/App/iOS/Resources/GoogleService-Info.plist' }}

STAGE_PROVISION_SECRET: ${{ secrets.STAGE_PROVISION_SECRET }}
ENCRYPTED_STAGE_PROVISION_PATH: ${{ 'Tuist/Signing/StageProvisionProfile.zip.gpg' }}
DECRYPTED_STAGE_PROVISION_PATH: ${{ 'Tuist/Signing/StageProvisionProfile.zip' }}

PROD_PROVISION_SECRET: ${{ secrets.PROD_PROVISION_SECRET }}
ENCRYPTED_PROD_PROVISION_PATH: ${{ 'Tuist/Signing/ProdProvisionProfile.zip.gpg' }}
DECRYPTED_PROD_PROVISION_PATH: ${{ 'Tuist/Signing/ProdProvisionProfile.zip' }}

MASTER_KEY_SECRET: ${{ secrets.MASTER_KEY_SECRET }}
ENCRYPTED_MASTER_KEY_PATH: ${{ 'Tuist/master.key.gpg' }}
DECRYPTED_MASTER_KEY_PATH: ${{ 'Tuist/master.key' }}

FASTLANE_SECRET: ${{ secrets.FASTLANE_SECRET }}
ENCRYPTED_FASTLANE_ENV_PATH: ${{ 'fastlane/.env.default.gpg' }}
DECRYPTED_FASTLANE_ENV_PATH: ${{ 'fastlane/.env.default' }}
Expand All @@ -55,26 +43,29 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.MATCH_SSH_PRIVATE_KEY }}

- name: Decode encrypted files
run: sh .github/workflows/AppStore/Decode.sh
run: |
sh .github/workflows/AppStore/Decode.sh
sh .github/workflows/AppStore/Keychain.sh
shell: bash
env:
KEYCHAIN: "todaywhat.keychain"

- uses: jdx/mise-action@v2

- name: Install tuist
run: |
tuist_version=`cat .tuist-version`
mise install tuist@$tuist_version
- name: Configure Keychain
run: sh .github/workflows/AppStore/Keychain.sh
shell: bash
mise install tuist
- name: Install fastlane
run: brew install fastlane

- name: Install dependencies
run: tuist fetch
run: tuist install

- name: Project generate
run: TUIST_ENV=CD tuist generate
Expand All @@ -90,6 +81,9 @@ jobs:
run: sh .github/workflows/TestFlight/TestFlight.sh
shell: bash
env:
FASTLANE_PASSWORD: ${{ secrets.FASTLANE_PASSWORD }}
MATCH_KEYCHAIN_PASSWORD: ${{ secrets.MATCH_KEYCHAIN_PASSWORD }}
MATCH_PASSWORD: ${{ secrets.MATCH_PASSPHRASE }}
PLATFORM: ${{ github.event.inputs.platform }}
VERSION: ${{ github.event.inputs.version }}

Expand Down
2 changes: 1 addition & 1 deletion Projects/App/iOS/Support/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<key>CFBundleShortVersionString</key>
<string>1.11.8</string>
<key>CFBundleVersion</key>
<string>46</string>
<string>47</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSRequiresIPhoneOS</key>
Expand Down
Binary file removed Tuist/Signing/ProdProvisionProfile.zip.gpg
Binary file not shown.
Binary file removed Tuist/Signing/StageProvisionProfile.zip.gpg
Binary file not shown.
1 change: 0 additions & 1 deletion Tuist/Signing/TodayWhat.cer.encrypted

This file was deleted.

1 change: 0 additions & 1 deletion Tuist/Signing/TodayWhat.p12.encrypted

This file was deleted.

Binary file removed Tuist/master.key.gpg
Binary file not shown.
Binary file modified fastlane/.env.default.gpg
Binary file not shown.
Loading

0 comments on commit 3e1fab8

Please sign in to comment.