Feature: Add CI Support (#100)

This commit is contained in:
Yicheng 2019-02-12 16:12:44 +08:00 committed by GitHub
parent 75035d922b
commit 6ce7e28c6e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 67 additions and 6 deletions

2
.gitignore vendored
View File

@ -3,3 +3,5 @@ Carthage
ClashX.a
ClashX.h
ClashX/Resources/dashboard
ClashX.app
*.dmg

47
.travis.yml Normal file
View File

@ -0,0 +1,47 @@
language: objective-c
osx_image: xcode10.1
node_js: 10
before_install:
- openssl aes-256-cbc -K $encrypted_a43c9d4ca4d4_key -iv $encrypted_a43c9d4ca4d4_iv
-in dist.p12.enc -out scripts/travis/dist.p12 -d
- security create-keychain -p mysecretpassword build.keychain
- security default-keychain -s build.keychain
- security unlock-keychain -p mysecretpassword build.keychain
- security set-keychain-settings -t 3600 -u build.keychain
- security import ./scripts/travis/dist.p12 -k build.keychain -T /usr/bin/codesign
-P ""
- 'security set-key-partition-list -S apple-tool:,apple: -s -k mysecretpassword build.keychain'
install:
- wget http://geolite.maxmind.com/download/geoip/database/GeoLite2-Country.tar.gz
- tar -zxvf GeoLite2-Country.tar.gz
- mv GeoLite2-Country_*/GeoLite2-Country.mmdb ./ClashX/Support\ Files/Country.mmdb
- cd ClashX/Resources
- git clone -b gh-pages https://github.com/Dreamacro/clash-dashboard.git dashboard
- cd ..
- go build -buildmode=c-archive
- cd $TRAVIS_BUILD_DIR
script:
- 'xcodebuild -workspace ClashX.xcworkspace -scheme "ClashX" build CODE_SIGN_IDENTITY="Developer
ID Application: Fuzhou West2Online Internet Inc. (MEWHFZ92DY)"| xcpretty'
before_deploy:
- gem install gym
- fastlane gym -s ClashX --disable_xcpretty
- npm install --global create-dmg
- create-dmg ClashX.app
- mv ClashX*.dmg ClashX.dmg
deploy:
provider: releases
prerelease: false
skip_cleanup: true
api_key:
secure: YKO96FhN1JgvM+EiyciNQCu8nk/t87txxCEA5//XuKGKh+75tVyB+udmEL4sQL2R01vuShO5WwXLRulHkDsVFjNgvTGa64cdG6SMNORMI+mEuBW2L/RPtkaK1GAY+l+iGkH9i1Ng0SaDqL8xSc5rkqicdUV9NSDrg3k+Ck0pu/DvHgwHAmIjN0JG73TuQKfENDlwoa/uj6ztXpxGR30vgobqaex8wwGV+9fs8Jfbh3cO/79iGXweRhJptvvW0EAF1vV95KyEaUYtHP+7NYVVapOCWwek2irdn1HBm4pRib/0bHh/wFQgnI9OoQbKYuKNc6xRnt9h0wWh+SSIwRA1X7jiZTipli+7G2HGXpvW0r8jMskhYxqjcRH5EWB8rGXoiy/16GUuY1SK1ID/oW9nSh5ws6quaRBmpXGyJcoOUq9STsF+HVOF1DOX4qRt8B7049ytdKIRNe3QGmOlc8w3Nyi5y/v9CHWmVWRrKvzJ8qXP/+JJlFIsXhZR+TYqosiX2ZoKpanLv1RFFbU5FxqdaQapQX465FlpoD/6Qhv+2WLmLBgI1+ewR6g/wjLus6unVu4C3ztYov/9Y7OhYlfD+CqdzKOn+98gGAPRV92MfFh8Qa6rXjsVbP4dC09zKze/+OZtCXr36C5M40MYIChVuSUlDSG4IhElylboSYvQ/wQ=
file:
- ClashX.dmg
- ClashX.app.dSYM.zip
on:
repo: yichengchen/clashX
branch: master
tags: true

View File

@ -104,6 +104,7 @@
/* Begin PBXFileReference section */
0358BF8F0CBD7FF9A7EA4E30 /* Pods_ClashX.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ClashX.framework; sourceTree = BUILT_PRODUCTS_DIR; };
490B7B9F2211911A0045B687 /* .travis.yml */ = {isa = PBXFileReference; lastKnownFileType = text; path = .travis.yml; sourceTree = "<group>"; };
4913C82221157D0200F6B87C /* Notification.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Notification.swift; sourceTree = "<group>"; };
492C4868210EE6B9004554A0 /* ApiRequest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ApiRequest.swift; sourceTree = "<group>"; };
492C4870210EF62E004554A0 /* ClashConfig.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClashConfig.swift; sourceTree = "<group>"; };
@ -334,6 +335,7 @@
49CF3B1E20CD7463001EBF94 /* Products */,
76229F122B00E935D126742A /* Pods */,
CF1AC9FACC36FCE7663C5583 /* Frameworks */,
490B7B9F2211911A0045B687 /* .travis.yml */,
49BC061E2129A34D005A0FE7 /* appcast.xml */,
);
sourceTree = "<group>";
@ -721,7 +723,7 @@
buildSettings = {
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = ClashXLaunchHelper/ClashXLaunchHelper.entitlements;
CODE_SIGN_STYLE = Automatic;
CODE_SIGN_STYLE = Manual;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = MEWHFZ92DY;
ENABLE_HARDENED_RUNTIME = YES;
@ -732,6 +734,7 @@
);
PRODUCT_BUNDLE_IDENTIFIER = com.west2online.ClashX.LaunchHelper;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
@ -744,7 +747,8 @@
buildSettings = {
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = ClashXLaunchHelper/ClashXLaunchHelper.entitlements;
CODE_SIGN_STYLE = Automatic;
CODE_SIGN_IDENTITY = "Developer ID Application";
CODE_SIGN_STYLE = Manual;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = MEWHFZ92DY;
ENABLE_HARDENED_RUNTIME = YES;
@ -755,6 +759,7 @@
);
PRODUCT_BUNDLE_IDENTIFIER = com.west2online.ClashX.LaunchHelper;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SKIP_INSTALL = YES;
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.2;
@ -882,7 +887,7 @@
buildSettings = {
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "Mac Developer";
CODE_SIGN_STYLE = Automatic;
CODE_SIGN_STYLE = Manual;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = MEWHFZ92DY;
FRAMEWORK_SEARCH_PATHS = (
@ -915,8 +920,8 @@
baseConfigurationReference = A1485BCE642059532D01B8BA /* Pods-ClashX.release.xcconfig */;
buildSettings = {
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "Mac Developer";
CODE_SIGN_STYLE = Automatic;
CODE_SIGN_IDENTITY = "Developer ID Application";
CODE_SIGN_STYLE = Manual;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = MEWHFZ92DY;
FRAMEWORK_SEARCH_PATHS = (

View File

@ -95,7 +95,7 @@
36B6A3221E263590002B5B1D = {
CreatedOnToolsVersion = 8.2.1;
LastSwiftMigration = 1000;
ProvisioningStyle = Automatic;
ProvisioningStyle = Manual;
};
};
};
@ -236,7 +236,10 @@
36B6A32B1E263590002B5B1D /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Manual;
DEVELOPMENT_TEAM = "";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SKIP_INSTALL = YES;
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.2;
@ -246,7 +249,11 @@
36B6A32C1E263590002B5B1D /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_IDENTITY = "Developer ID Application";
CODE_SIGN_STYLE = Manual;
DEVELOPMENT_TEAM = MEWHFZ92DY;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SKIP_INSTALL = YES;
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.2;

BIN
dist.p12.enc Normal file

Binary file not shown.

0
scripts/travis/.gitkeep Normal file
View File