Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI 구축 #32

Merged
merged 5 commits into from
Nov 7, 2024
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
53 changes: 53 additions & 0 deletions .github/workflows/swift.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: My Swift Actions 🚗

on:
pull_request:
branches: ["develop"]

jobs:
build:
runs-on: macos-latest

steps:
- uses: actions/checkout@v4
- name: 🔖 certificate
env:
BUILD_CERTIFICATE_BASE64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }}
P12_PASSWORD: ${{ secrets.P12_PASSWORD }}
BUILD_PROVISION_PROFILE_BASE64: ${{ secrets.BUILD_PROVISION_PROFILE_BASE64 }}
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
run: |
# create variables
CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12
PP_PATH=$RUNNER_TEMP/build_pp.mobileprovision
KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db

# import certificate and provisioning profile from secrets
echo -n "$BUILD_CERTIFICATE_BASE64" | base64 --decode -o $CERTIFICATE_PATH
echo -n "$BUILD_PROVISION_PROFILE_BASE64" | base64 --decode -o $PP_PATH

# create temporary keychain
security create-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
security set-keychain-settings -lut 21600 $KEYCHAIN_PATH
security unlock-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH

# import certificate to keychain
security import $CERTIFICATE_PATH -P "$P12_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
security set-key-partition-list -S apple-tool:,apple: -k "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
security list-keychain -d user -s $KEYCHAIN_PATH

# apply provisioning profile
mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
cp $PP_PATH ~/Library/MobileDevice/Provisioning\ Profiles

- name: 🔨 set up xcode version
run: |
sudo xcode-select -s /Applications/Xcode_16.1.app

- name: ✅ check xcode version
run: |
sudo xcodebuild -version

- name: Build
run: |
xcodebuild -workspace ./MemorialHouse/MemorialHouse.xcworkspace -scheme MemorialHouse -destination 'platform=iOS Simulator,name=iPhone 16 Pro'
25 changes: 25 additions & 0 deletions .github/workflows/swiftlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: swiftlint 🔨

on:
pull_request:
branches: ["develop"]
paths:
- ".github/workflows/swiftlint.yml"
- ".swiftlint.yml"
- "**/*.swift"

jobs:
SwiftLint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: GitHub Action for SwiftLint
uses: norio-nomura/[email protected]
- name: GitHub Action for SwiftLint (Only files changed in the PR)
uses: norio-nomura/[email protected]
env:
DIFF_BASE: ${{ github.base_ref }}
- name: GitHub Action for SwiftLint (Different working directory)
uses: norio-nomura/[email protected]
env:
WORKING_DIRECTORY: Source
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,6 @@
buildRules = (
);
dependencies = (
CED59DC52CD9E07B005BE50D /* PBXTargetDependency */,
);
name = MemorialHouse;
packageProductDependencies = (
Expand Down Expand Up @@ -189,7 +188,7 @@
mainGroup = 0EE4A0772CD5DD1800F17FA5;
minimizedProjectReferenceProxies = 1;
packageReferences = (
CED59DC32CD9E053005BE50D /* XCRemoteSwiftPackageReference "SwiftLintPlugins" */,
DB4326A12CDD1E78009C03B8 /* XCRemoteSwiftPackageReference "SwiftLintPlugins" */,
);
preferredProjectObjectVersion = 77;
productRefGroup = 0EE4A0812CD5DD1800F17FA5 /* Products */;
Expand Down Expand Up @@ -247,13 +246,6 @@
};
/* End PBXSourcesBuildPhase section */

/* Begin PBXTargetDependency section */
CED59DC52CD9E07B005BE50D /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
productRef = CED59DC42CD9E07B005BE50D /* SwiftLintBuildToolPlugin */;
};
/* End PBXTargetDependency section */

/* Begin PBXVariantGroup section */
0EE4A09C2CD5DD2400F17FA5 /* LaunchScreen.storyboard */ = {
isa = PBXVariantGroup;
Expand Down Expand Up @@ -477,7 +469,7 @@
/* End XCConfigurationList section */

/* Begin XCRemoteSwiftPackageReference section */
CED59DC32CD9E053005BE50D /* XCRemoteSwiftPackageReference "SwiftLintPlugins" */ = {
DB4326A12CDD1E78009C03B8 /* XCRemoteSwiftPackageReference "SwiftLintPlugins" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/SimplyDanny/SwiftLintPlugins";
requirement = {
Expand All @@ -486,14 +478,6 @@
};
};
/* End XCRemoteSwiftPackageReference section */

/* Begin XCSwiftPackageProductDependency section */
CED59DC42CD9E07B005BE50D /* SwiftLintBuildToolPlugin */ = {
isa = XCSwiftPackageProductDependency;
package = CED59DC32CD9E053005BE50D /* XCRemoteSwiftPackageReference "SwiftLintPlugins" */;
productName = "plugin:SwiftLintBuildToolPlugin";
};
/* End XCSwiftPackageProductDependency section */
};
rootObject = 0EE4A0782CD5DD1800F17FA5 /* Project object */;
}
4 changes: 2 additions & 2 deletions MemorialHouse/MHCore/MHCore.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
mainGroup = CE9AEBB12CD7B5EF00F8471D;
minimizedProjectReferenceProxies = 1;
packageReferences = (
0E7F28842CDA07E7007D4F2B /* XCRemoteSwiftPackageReference "SwiftLintPlugins" */,
DB4326A22CDD1E9A009C03B8 /* XCRemoteSwiftPackageReference "SwiftLintPlugins" */,
);
preferredProjectObjectVersion = 77;
productRefGroup = CE9AEBBC2CD7B5EF00F8471D /* Products */;
Expand Down Expand Up @@ -405,7 +405,7 @@
/* End XCConfigurationList section */

/* Begin XCRemoteSwiftPackageReference section */
0E7F28842CDA07E7007D4F2B /* XCRemoteSwiftPackageReference "SwiftLintPlugins" */ = {
DB4326A22CDD1E9A009C03B8 /* XCRemoteSwiftPackageReference "SwiftLintPlugins" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/SimplyDanny/SwiftLintPlugins";
requirement = {
Expand Down
4 changes: 2 additions & 2 deletions MemorialHouse/MHData/MHData.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
mainGroup = CE9AEB6D2CD7B46700F8471D;
minimizedProjectReferenceProxies = 1;
packageReferences = (
0E7F288B2CDA086E007D4F2B /* XCRemoteSwiftPackageReference "SwiftLintPlugins" */,
DB4326A52CDD1ECE009C03B8 /* XCRemoteSwiftPackageReference "SwiftLintPlugins" */,
);
preferredProjectObjectVersion = 77;
productRefGroup = CE9AEB782CD7B46700F8471D /* Products */;
Expand Down Expand Up @@ -413,7 +413,7 @@
/* End XCConfigurationList section */

/* Begin XCRemoteSwiftPackageReference section */
0E7F288B2CDA086E007D4F2B /* XCRemoteSwiftPackageReference "SwiftLintPlugins" */ = {
DB4326A52CDD1ECE009C03B8 /* XCRemoteSwiftPackageReference "SwiftLintPlugins" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/SimplyDanny/SwiftLintPlugins";
requirement = {
Expand Down
4 changes: 2 additions & 2 deletions MemorialHouse/MHDomain/MHDomain.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
mainGroup = CE9AEB442CD7B31300F8471D;
minimizedProjectReferenceProxies = 1;
packageReferences = (
0E7F288D2CDA0881007D4F2B /* XCRemoteSwiftPackageReference "SwiftLintPlugins" */,
DB4326A62CDD1ED8009C03B8 /* XCRemoteSwiftPackageReference "SwiftLintPlugins" */,
);
preferredProjectObjectVersion = 77;
productRefGroup = CE9AEB4F2CD7B31300F8471D /* Products */;
Expand Down Expand Up @@ -409,7 +409,7 @@
/* End XCConfigurationList section */

/* Begin XCRemoteSwiftPackageReference section */
0E7F288D2CDA0881007D4F2B /* XCRemoteSwiftPackageReference "SwiftLintPlugins" */ = {
DB4326A62CDD1ED8009C03B8 /* XCRemoteSwiftPackageReference "SwiftLintPlugins" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/SimplyDanny/SwiftLintPlugins";
requirement = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
mainGroup = DB3CB96B2CD9B08A008186F4;
minimizedProjectReferenceProxies = 1;
packageReferences = (
0E7F28862CDA082A007D4F2B /* XCRemoteSwiftPackageReference "SwiftLintPlugins" */,
DB4326A32CDD1EB7009C03B8 /* XCRemoteSwiftPackageReference "SwiftLintPlugins" */,
);
preferredProjectObjectVersion = 77;
productRefGroup = DB3CB9762CD9B08A008186F4 /* Products */;
Expand Down Expand Up @@ -397,7 +397,7 @@
/* End XCConfigurationList section */

/* Begin XCRemoteSwiftPackageReference section */
0E7F28862CDA082A007D4F2B /* XCRemoteSwiftPackageReference "SwiftLintPlugins" */ = {
DB4326A32CDD1EB7009C03B8 /* XCRemoteSwiftPackageReference "SwiftLintPlugins" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/SimplyDanny/SwiftLintPlugins";
requirement = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@
mainGroup = CE9AEB8F2CD7B4F200F8471D;
minimizedProjectReferenceProxies = 1;
packageReferences = (
0E7F28892CDA084F007D4F2B /* XCRemoteSwiftPackageReference "SwiftLintPlugins" */,
DB4326A42CDD1EC2009C03B8 /* XCRemoteSwiftPackageReference "SwiftLintPlugins" */,
);
preferredProjectObjectVersion = 77;
productRefGroup = CE9AEB9A2CD7B4F200F8471D /* Products */;
Expand Down Expand Up @@ -465,7 +465,7 @@
/* End XCConfigurationList section */

/* Begin XCRemoteSwiftPackageReference section */
0E7F28892CDA084F007D4F2B /* XCRemoteSwiftPackageReference "SwiftLintPlugins" */ = {
DB4326A42CDD1EC2009C03B8 /* XCRemoteSwiftPackageReference "SwiftLintPlugins" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/SimplyDanny/SwiftLintPlugins";
requirement = {
Expand Down
Loading