Skip to content

Commit

Permalink
add certs
Browse files Browse the repository at this point in the history
  • Loading branch information
Jixu Hu committed Dec 11, 2021
1 parent 3ae8c83 commit dce55b8
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 5 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/swift.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,16 @@ jobs:
- name: Use release tag as version
if: startsWith(github.ref, 'refs/tags')
run: bash .travis/release-a-version.sh
- name: Setup certificates
uses: apple-actions/import-codesign-certs@v1
with:
p12-file-base64: ${{ secrets.CERTIFICATES_P12 }}
p12-password: ${{ secrets.CERTIFICATES_P12_PASSWORD }}
- name: Build
run: bash .travis/build.sh
env:
CS_ID: "Apple Developmen"
CS_TEAM: "V299WZCD66"
- name: Prepare Delta
run: bash .travis/prepare_delta.sh
- name: Sparkle
Expand Down
14 changes: 10 additions & 4 deletions .travis/build.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
xcodebuild -resolvePackageDependencies -workspace Clipy.xcworkspace -scheme Clipy -configuration Release -clonedSourcePackagesDirPath SourcePackages
: "${CS_ID:=}"
: "${CS_TEAM:=}"

set -o pipefail && xcodebuild -workspace Clipy.xcworkspace -scheme Clipy -configuration Release -clonedSourcePackagesDirPath SourcePackages -destination 'generic/platform=macOS' -archivePath Clipy.xcarchive CODE_SIGN_IDENTITY='' DEVELOPMENT_TEAM='' clean archive | xcpretty
xcodebuild -resolvePackageDependencies -workspace Clipy.xcworkspace -scheme Clipy -configuration Release -clonedSourcePackagesDirPath SourcePackages

rm -rf Clipy.app* || true && cp -rfv Clipy.xcarchive/Products/Applications/Clipy.app ./
set -o pipefail && xcodebuild -workspace Clipy.xcworkspace -scheme Clipy -configuration Release -clonedSourcePackagesDirPath SourcePackages -destination 'generic/platform=macOS' -archivePath Clipy.xcarchive CODE_SIGN_IDENTITY="${CS_ID}" DEVELOPMENT_TEAM="${CS_TEAM}" clean archive | xcpretty

zip -ry Clipy.app.zip Clipy.app
# Clean up
rm -rf Clipy.app* || true
working_dir=$(pwd)
# Copy
(cd Clipy.xcarchive/Products/Applications && zip -ry "${working_dir}/Clipy.app.zip" Clipy.app)
unzip Clipy.app.zip
9 changes: 8 additions & 1 deletion Clipy.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,8 @@
3CE710B72750E6A900A8A29A /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ru; path = ru.lproj/CPYTypePreferenceViewController.strings; sourceTree = "<group>"; };
3CE710B92750E6B500A8A29A /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/CPYUpdatesPreferenceViewController.strings; sourceTree = "<group>"; };
3CE710BB2750E6B600A8A29A /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ru; path = ru.lproj/CPYUpdatesPreferenceViewController.strings; sourceTree = "<group>"; };
3CE710BC275F5BFD00A8A29A /* Clipy.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Clipy.entitlements; sourceTree = "<group>"; };
3CE710BD275F5C1D00A8A29A /* ClipyRelease.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = ClipyRelease.entitlements; sourceTree = "<group>"; };
3CF0ACD1231172BF0097CB68 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/CPYPreferencesWindowController.strings; sourceTree = "<group>"; };
3CF0ACD2231172C00097CB68 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/CPYBetaPreferenceViewController.strings; sourceTree = "<group>"; };
3CF0ACD3231172C00097CB68 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/CPYExcludeAppPreferenceViewController.strings; sourceTree = "<group>"; };
Expand Down Expand Up @@ -575,6 +577,8 @@
FAC43DC81B35D8B100C06102 /* Clipy */ = {
isa = PBXGroup;
children = (
3CE710BD275F5C1D00A8A29A /* ClipyRelease.entitlements */,
3CE710BC275F5BFD00A8A29A /* Clipy.entitlements */,
FA06D2D21DD882BD002FB7C2 /* Resources */,
FA1DB49D1DDCB405007F95C8 /* Xibs */,
FA1DB49C1DDCB3FB007F95C8 /* Sources */,
Expand Down Expand Up @@ -687,7 +691,6 @@
TargetAttributes = {
FAC43DC51B35D8B100C06102 = {
CreatedOnToolsVersion = 6.3.2;
DevelopmentTeam = BBCHAJ584H;
LastSwiftMigration = 1030;
};
FAC43DD71B35D8B100C06102 = {
Expand Down Expand Up @@ -1233,8 +1236,10 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Clipy/Clipy.entitlements;
CODE_SIGN_IDENTITY = "-";
COMBINE_HIDPI_IMAGES = YES;
ENABLE_HARDENED_RUNTIME = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)",
Expand All @@ -1261,9 +1266,11 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Clipy/ClipyRelease.entitlements;
CODE_SIGN_IDENTITY = "-";
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = "";
ENABLE_HARDENED_RUNTIME = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)",
Expand Down
8 changes: 8 additions & 0 deletions Clipy/Clipy.entitlements
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.automation.apple-events</key>
<true/>
</dict>
</plist>
8 changes: 8 additions & 0 deletions Clipy/ClipyRelease.entitlements
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.automation.apple-events</key>
<true/>
</dict>
</plist>

0 comments on commit dce55b8

Please sign in to comment.