Skip to content

Commit

Permalink
feat: code sign app
Browse files Browse the repository at this point in the history
  • Loading branch information
qwertyyb authored and qwertyyb committed Feb 18, 2021
1 parent 1bc28f6 commit 83d36d9
Show file tree
Hide file tree
Showing 17 changed files with 240 additions and 155 deletions.
35 changes: 22 additions & 13 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
name: build installer.pkg

on:
workflow_dispatch:
inputs:
release:
description: 'release version'
required: true
default: 'v1.0.2'
pull_request:
types: [closed]

Expand Down Expand Up @@ -72,24 +78,27 @@ jobs:
- name: install depencies
run: pod install

- name: build
run: ./build_app.sh
- name: build Fire.app
run: ./scripts/a_build_app.sh

- name: make FireInstaller.pkg
run: ./package/make_package.sh
- name: build FireInstaller.pkg
run: ./scripts/b_build_installer.sh

- name: notarize FireInstaller.pkg
run: ./scripts/c_notarize_installer.sh

- name: generate appcast.xml
env:
sparkle_key: ${{ secrets.sparkle_key }}
run: ./build_appcast.sh
run: ./scripts/d_build_appcast.sh

- name: gather artifact
run: cp ./Fire/Info.plist ./apps/
run: cp ./Fire/Info.plist ./dist/

- uses: actions/upload-artifact@v2
with:
name: apps
path: ./apps/
name: dist
path: ./dist/
retention-days: 7

upload_publish:
Expand All @@ -100,8 +109,8 @@ jobs:

- uses: actions/download-artifact@v2
with:
name: apps
path: ./apps
name: dist
path: ./dist

- uses: actions/download-artifact@v2
with:
Expand All @@ -120,7 +129,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.get_upload_url.outputs.upload_url }}
asset_path: ./apps/FireInstaller.pkg
asset_path: ./dist/FireInstaller.pkg
asset_name: FireInstaller.pkg
asset_content_type: application/octet-stream

Expand All @@ -130,7 +139,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.get_upload_url.outputs.upload_url }}
asset_path: ./apps/Fire.zip
asset_path: ./dist/Fire.zip
asset_name: Fire.zip
asset_content_type: application/zip

Expand All @@ -141,7 +150,7 @@ jobs:
git checkout .
git fetch
git checkout gh-pages
mv apps/appcast.xml ./appcast.xml
mv dist/appcast.xml ./appcast.xml
git add appcast.xml
git commit -m "feat: 更新appcast.xml"
git push origin gh-pages
14 changes: 7 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,19 @@ jobs:
- name: install depencies
run: pod install

- name: build
run: ./build_app.sh
- name: build Fire.app
run: ./scripts/a_build_app.sh

- name: make FireInstaller.pkg
run: ./package/make_package.sh
- name: build FireInstaller.pkg
run: ./scripts/b_build_installer.sh

- name: generate appcast.xml
env:
sparkle_key: ${{ secrets.sparkle_key }}
run: ./build_appcast.sh
run: ./scripts/d_build_appcast.sh

- uses: actions/upload-artifact@v2
with:
name: apps
path: ./apps/
name: dist
path: ./dist/
retention-days: 3
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@

/apps
/dist
/*.xcarchive
/*.log
/package/*.pkg
Expand Down
55 changes: 35 additions & 20 deletions Fire.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@
/* End PBXCopyFilesBuildPhase section */

/* Begin PBXFileReference section */
060E0C2FC1C04AEFD80DD621 /* libPods-Fire.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Fire.a"; sourceTree = BUILT_PRODUCTS_DIR; };
451E6044232E227B007B0463 /* Fire.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Fire.app; sourceTree = BUILT_PRODUCTS_DIR; };
451E6047232E227B007B0463 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
451E604F232E227C007B0463 /* Fire.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Fire.entitlements; sourceTree = "<group>"; };
Expand All @@ -92,7 +91,6 @@
459DE98F232EB26500A3ACD1 /* CandidatesWindow.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CandidatesWindow.swift; sourceTree = "<group>"; };
45D996A9253C5232001460A8 /* GeneralPane.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GeneralPane.swift; sourceTree = "<group>"; };
45E85F732573BE1800F71024 /* wb_98_table.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = wb_98_table.txt; sourceTree = "<group>"; };
497E90F13FA9A943AC0BE3DB /* Pods-Fire.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Fire.release.xcconfig"; path = "Target Support Files/Pods-Fire/Pods-Fire.release.xcconfig"; sourceTree = "<group>"; };
673A400B253D9FE70003901E /* InputSource.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InputSource.swift; sourceTree = "<group>"; };
673C416825468A4800F462A3 /* FireMenu.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FireMenu.swift; sourceTree = "<group>"; };
673C417125468FFA00F462A3 /* ModifierKeyUpChecker.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ModifierKeyUpChecker.swift; sourceTree = "<group>"; };
Expand All @@ -102,7 +100,9 @@
67E8B516233B97FD00D7CE80 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
67E8B518233B994000D7CE80 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/InfoPlist.strings"; sourceTree = "<group>"; };
67E8B51E233C537B00D7CE80 /* fire.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = fire.pdf; sourceTree = "<group>"; };
ADD2AD3F7D485FFF4784CBC3 /* Pods-Fire.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Fire.debug.xcconfig"; path = "Target Support Files/Pods-Fire/Pods-Fire.debug.xcconfig"; sourceTree = "<group>"; };
79993C01BC909D0DEEFF5E1F /* Pods-Fire.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Fire.debug.xcconfig"; path = "Target Support Files/Pods-Fire/Pods-Fire.debug.xcconfig"; sourceTree = "<group>"; };
C9B35A5256409EF1557C898C /* Pods-Fire.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Fire.release.xcconfig"; path = "Target Support Files/Pods-Fire/Pods-Fire.release.xcconfig"; sourceTree = "<group>"; };
FEC7043EB25D21E0E0098AA7 /* libPods-Fire.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Fire.a"; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand All @@ -128,8 +128,8 @@
2361C68F9ECE84E0CA0822C3 /* Pods */ = {
isa = PBXGroup;
children = (
ADD2AD3F7D485FFF4784CBC3 /* Pods-Fire.debug.xcconfig */,
497E90F13FA9A943AC0BE3DB /* Pods-Fire.release.xcconfig */,
79993C01BC909D0DEEFF5E1F /* Pods-Fire.debug.xcconfig */,
C9B35A5256409EF1557C898C /* Pods-Fire.release.xcconfig */,
);
path = Pods;
sourceTree = "<group>";
Expand Down Expand Up @@ -185,7 +185,7 @@
children = (
45577E6825442EED0064325B /* libsqlite3.tbd */,
451E6058232E2787007B0463 /* InputMethodKit.framework */,
060E0C2FC1C04AEFD80DD621 /* libPods-Fire.a */,
FEC7043EB25D21E0E0098AA7 /* libPods-Fire.a */,
);
name = Frameworks;
sourceTree = "<group>";
Expand Down Expand Up @@ -243,13 +243,13 @@
isa = PBXNativeTarget;
buildConfigurationList = 451E6052232E227C007B0463 /* Build configuration list for PBXNativeTarget "Fire" */;
buildPhases = (
B7AF3759D9701C095D62024C /* [CP] Check Pods Manifest.lock */,
92D671001C2691A4592362FC /* [CP] Check Pods Manifest.lock */,
451E6040232E227B007B0463 /* Sources */,
451E6041232E227B007B0463 /* Frameworks */,
451E6042232E227B007B0463 /* Resources */,
CC4E3CB56A41B3947C0BFEC1 /* [CP] Embed Pods Frameworks */,
45587F2E24E91513005F291B /* lint */,
45577E8325443E080064325B /* CopyFiles */,
F59BCE8B8FEBA89F5AC70F62 /* [CP] Embed Pods Frameworks */,
);
buildRules = (
);
Expand Down Expand Up @@ -358,7 +358,7 @@
shellPath = /bin/sh;
shellScript = "# Type a script or drag a script file from your workspace to insert its path.\n\"${PODS_ROOT}/SwiftLint/swiftlint\"\n";
};
B7AF3759D9701C095D62024C /* [CP] Check Pods Manifest.lock */ = {
92D671001C2691A4592362FC /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
Expand All @@ -380,7 +380,7 @@
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
CC4E3CB56A41B3947C0BFEC1 /* [CP] Embed Pods Frameworks */ = {
F59BCE8B8FEBA89F5AC70F62 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
Expand Down Expand Up @@ -578,16 +578,20 @@
};
451E6053232E227C007B0463 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = ADD2AD3F7D485FFF4784CBC3 /* Pods-Fire.debug.xcconfig */;
baseConfigurationReference = 79993C01BC909D0DEEFF5E1F /* Pods-Fire.debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
BUILD_LIBRARY_FOR_DISTRIBUTION = NO;
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_ENTITLEMENTS = Fire/Fire.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CONFIGURATION_BUILD_DIR = "/Library/Input Methods";
DEVELOPMENT_TEAM = "";
DEVELOPMENT_TEAM = T68XK6867P;
ENABLE_HARDENED_RUNTIME = YES;
EXCLUDED_ARCHS = "";
INFOPLIST_FILE = Fire/Info.plist;
LD_MAP_FILE_PATH = "";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
Expand All @@ -596,29 +600,36 @@
PODS_CONFIGURATION_BUILD_DIR = "${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)";
PRODUCT_BUNDLE_IDENTIFIER = com.qwertyyb.inputmethod.Fire;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_VERSION = 5.0;
SYMROOT = build;
};
name = Debug;
};
451E6054232E227C007B0463 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 497E90F13FA9A943AC0BE3DB /* Pods-Fire.release.xcconfig */;
baseConfigurationReference = C9B35A5256409EF1557C898C /* Pods-Fire.release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
BUILD_LIBRARY_FOR_DISTRIBUTION = NO;
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_ENTITLEMENTS = Fire/Fire.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = "";
DEVELOPMENT_TEAM = T68XK6867P;
ENABLE_HARDENED_RUNTIME = YES;
EXCLUDED_ARCHS = "";
INFOPLIST_FILE = Fire/Info.plist;
LD_MAP_FILE_PATH = "";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.15;
ONLY_ACTIVE_ARCH = NO;
PRODUCT_BUNDLE_IDENTIFIER = com.qwertyyb.inputmethod.Fire;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_VERSION = 5.0;
SYMROOT = build;
};
Expand All @@ -627,24 +638,28 @@
45577E6425442E240064325B /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = "";
DEVELOPMENT_TEAM = T68XK6867P;
ENABLE_HARDENED_RUNTIME = YES;
MACH_O_TYPE = mh_execute;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SKIP_INSTALL = YES;
};
name = Debug;
};
45577E6525442E240064325B /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = "";
DEVELOPMENT_TEAM = T68XK6867P;
ENABLE_HARDENED_RUNTIME = YES;
MACH_O_TYPE = mh_execute;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SKIP_INSTALL = YES;
};
name = Release;
};
Expand Down
2 changes: 1 addition & 1 deletion Fire.xcodeproj/xcshareddata/xcschemes/Fire.xcscheme
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
LastUpgradeVersion = "1200"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
parallelizeBuildables = "NO"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
Expand Down
4 changes: 2 additions & 2 deletions Fire/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>v0.0.1</string>
<string>v0.2.0</string>
<key>CFBundleURLTypes</key>
<array>
<dict/>
</array>
<key>CFBundleVersion</key>
<string>20201028052914</string>
<string>20210218144127</string>
<key>ComponentInputModeDict</key>
<dict>
<key>tsInputModeListKey</key>
Expand Down
4 changes: 3 additions & 1 deletion Podfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Uncomment the next line to define a global platform for your project
platform :osx, '10.15'
platform :osx, '10.14'

inhibit_all_warnings!

target 'Fire' do
# Comment the next line if you don't want to use dynamic frameworks
Expand Down
16 changes: 8 additions & 8 deletions Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
PODS:
- Defaults (4.1.0)
- Preferences (2.0.1)
- Sparkle (1.23.0)
- SwiftLint (0.40.3)
- Preferences (2.2.0)
- Sparkle (1.24.0)
- SwiftLint (0.42.0)

DEPENDENCIES:
- Defaults
Expand All @@ -19,10 +19,10 @@ SPEC REPOS:

SPEC CHECKSUMS:
Defaults: 2198ac20a65633de273110b5e9954f0a252f275b
Preferences: 1ce41315ecadd28a9a4dd92ccd5dea7ca3437f92
Sparkle: 55b1a87ba69d56913375a281546b7c82dec95bb0
SwiftLint: dfd554ff0dff17288ee574814ccdd5cea85d76f7
Preferences: 4894cc28df3557336b0b72440c893d95203d3e33
Sparkle: 270cd27377bf04e9c128af06e3a22d0f572d6ee3
SwiftLint: 4fa9579c63416865179bc416f0a92d55f009600d

PODFILE CHECKSUM: fcf20d06250373889826449c419d7cc2b0688a1e
PODFILE CHECKSUM: f3222fdef34001bff78c89a55dda9f7e0a1e60e3

COCOAPODS: 1.9.3
COCOAPODS: 1.10.1
Loading

0 comments on commit 83d36d9

Please sign in to comment.