Skip to content

Commit

Permalink
[#68] 자동 배포를 위한 환경 준비
Browse files Browse the repository at this point in the history
  • Loading branch information
Gyuni authored Sep 3, 2021
1 parent a33d16e commit 47eeab6
Show file tree
Hide file tree
Showing 5 changed files with 135 additions and 17 deletions.
2 changes: 1 addition & 1 deletion ExportOptions.Plist → .github/ExportOptions.Plist
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<key>provisioningProfiles</key>
<dict>
<key>com.yourssu.YDS-Storybook</key>
<string>GithubActions_Distribution</string>
<string>GithubActions_Dist</string>
</dict>
<key>signingCertificate</key>
<string>Apple Distribution</string>
Expand Down
Binary file not shown.
Binary file not shown.
20 changes: 12 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
name: Archive and export
on:
release:
types: [published, created, edited]
types: [published, edited]
jobs:
build:
runs-on: [macos-latest]
env:
XC_VERSION: ${{ '12.4' }}
XC_PROJECT: ${{ 'YDS.xcodeproj' }}
XC_SCHEME: ${{ 'YDS-Storybook' }}
XC_CONFIGURATION: ${{ 'Automation' }}
XC_ARCHIVE_PATH: ${{ './YDS.xcarichive' }}
XC_EXPORT_PATH: ${{ './artifacts' }}
KEYCHAIN: ${{ 'temporary.keychain' }}

DECRYPTED_CERTS_FILE_PATH: ${{ '.github/secrets/yourssuCertification.p12' }}
ENCRYPTED_CERTS_FILE_PATH: ${{ '.github/secrets/yourssuCertification.p12.gpg' }}

DECRYPTED_PROVISION_FILE_PATH: ${{ '.github/secrets/GithubActions_Distribution.mobileprovision' }}
ENCRYPTED_PROVISION_FILE_PATH: ${{ '.github/secrets/GithubActions_Distribution.mobileprovision.gpg' }}
DECRYPTED_PROVISION_FILE_PATH: ${{ '.github/secrets/GithubActions_Dist.mobileprovision' }}
ENCRYPTED_PROVISION_FILE_PATH: ${{ '.github/secrets/GithubActions_Dist.mobileprovision.gpg' }}

CERTS_ENCRYPTION_PWD: ${{ secrets.CERTS_ENCRYPTION_PWD }}
PROVISION_ENCRYPTION_PWD: ${{ secrets.PROVISION_ENCRYPTION_PWD }}
Expand All @@ -29,8 +30,6 @@ jobs:
- name: Get tag version
id: get_version
run: echo ::set-output name=RELEASE_VERSION::$(echo ${GITHUB_REF:11})
- name: Set app version
run: sed -i .bak 's/MARKETING_VERSION = 1.0.0;/MARKETING_VERSION = ${{ env.RELEASE_VERSION }};/g' YDS.xcodeproj/project.pbxproj
- name: Configure Keychain
run: |
security create-keychain -p "" "$KEYCHAIN"
Expand All @@ -57,14 +56,19 @@ jobs:
- name: Archive app
run: |
mkdir artifacts
xcodebuild archive -project YDS.xcodeproj -scheme YDS-Storybook -configuration release -archivePath YDS.xcarchive
xcodebuild archive -project YDS.xcodeproj -scheme YDS-Storybook -configuration $XC_CONFIGURATION -archivePath YDS.xcarchive "OTHER_CODE_SIGN_FLAGS=--keychain '$KEYCHAIN'"
- name: Export app
run: |
xcodebuild -exportArchive -archivePath YDS.xcarchive -exportOptionsPlist ExportOptions.Plist -exportPath "$XC_EXPORT_PATH"
xcodebuild -exportArchive -archivePath YDS.xcarchive -exportOptionsPlist .github/ExportOptions.Plist -exportPath "$XC_EXPORT_PATH"
- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
name: Artifacts
path: ./artifacts
- name: Upload app to TestFlight
uses: apple-actions/upload-testflight-build@v1
with:
app-path: 'YDS-Storybook.ipa'
app-path: './artifacts/YDS-Storybook.ipa'
issuer-id: ${{ secrets.APPSTORE_ISSUER_ID }}
api-key-id: ${{ secrets.APPSTORE_API_KEY_ID }}
api-private-key: ${{ secrets.APPSTORE_API_PRIVATE_KEY }}
130 changes: 122 additions & 8 deletions YDS.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -722,6 +722,115 @@
/* End PBXVariantGroup section */

/* Begin XCBuildConfiguration section */
53A5AB5326E1DC3B008E81AB /* Automation */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = NO;
SDKROOT = iphoneos;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
VALIDATE_PRODUCT = YES;
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = Automation;
};
53A5AB5426E1DC3B008E81AB /* Automation */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = "";
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = YDS/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = com.yourssu.YDS;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
PROVISIONING_PROFILE_SPECIFIER = "";
SKIP_INSTALL = YES;
SUPPORTS_MACCATALYST = NO;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Automation;
};
53A5AB5526E1DC3B008E81AB /* Automation */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_IDENTITY = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
DEVELOPMENT_TEAM = 2N3PMJ78CA;
INFOPLIST_FILE = "YDS-Storybook/Info.plist";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 0.3.0;
PRODUCT_BUNDLE_IDENTIFIER = "com.yourssu.YDS-Storybook";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = GithubActions_Dist;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Automation;
};
DD151FB02641820200795D7C /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
Expand Down Expand Up @@ -865,6 +974,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.yourssu.YDS;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
SKIP_INSTALL = YES;
SUPPORTS_MACCATALYST = NO;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
Expand All @@ -875,9 +985,10 @@
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = 2N3PMJ78CA;
DEVELOPMENT_TEAM = "";
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
Expand All @@ -890,7 +1001,9 @@
);
PRODUCT_BUNDLE_IDENTIFIER = com.yourssu.YDS;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
PROVISIONING_PROFILE_SPECIFIER = "";
SKIP_INSTALL = YES;
SUPPORTS_MACCATALYST = NO;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
Expand All @@ -902,14 +1015,13 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2;
DEVELOPMENT_TEAM = 2N3PMJ78CA;
INFOPLIST_FILE = "YDS-Storybook/Info.plist";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 0.2.0;
MARKETING_VERSION = 0.3.0;
PRODUCT_BUNDLE_IDENTIFIER = "com.yourssu.YDS-Storybook";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
Expand All @@ -922,19 +1034,18 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 2;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = 2N3PMJ78CA;
INFOPLIST_FILE = "YDS-Storybook/Info.plist";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 0.2.0;
MARKETING_VERSION = 0.3.0;
PRODUCT_BUNDLE_IDENTIFIER = "com.yourssu.YDS-Storybook";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = GithubActions_Distribution;
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
Expand All @@ -948,6 +1059,7 @@
buildConfigurations = (
DD151FB02641820200795D7C /* Debug */,
DD151FB12641820200795D7C /* Release */,
53A5AB5326E1DC3B008E81AB /* Automation */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
Expand All @@ -957,6 +1069,7 @@
buildConfigurations = (
DD151FB32641820200795D7C /* Debug */,
DD151FB42641820200795D7C /* Release */,
53A5AB5426E1DC3B008E81AB /* Automation */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
Expand All @@ -966,6 +1079,7 @@
buildConfigurations = (
DDFBD00D26739A6B00C5F409 /* Debug */,
DDFBD00E26739A6B00C5F409 /* Release */,
53A5AB5526E1DC3B008E81AB /* Automation */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
Expand Down

0 comments on commit 47eeab6

Please sign in to comment.