Skip to content

Commit 1f9f0b6

Browse files
authored
b/v1.1.3 (#6)
* improve stats efficiency + file hash + fix sidebar image * update build settings * checkpt, improve lag * checkpt * imp parser * imp * index improvements * update release action
1 parent ad8ca83 commit 1f9f0b6

12 files changed

Lines changed: 826 additions & 172 deletions

File tree

.github/workflows/release.yml

Lines changed: 98 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,51 +12,136 @@ jobs:
1212
release:
1313
runs-on: macos-26
1414

15+
env:
16+
KEYCHAIN_PATH: ${{ runner.temp }}/build.keychain-db
17+
KEYCHAIN_PASSWORD: ${{ github.run_id }}
18+
1519
steps:
1620
- uses: actions/checkout@v4
1721

22+
- name: Install certificates
23+
env:
24+
DEVELOPER_ID_APPLICATION_P12: ${{ secrets.DEVELOPER_ID_APPLICATION_P12 }}
25+
DEVELOPER_ID_INSTALLER_P12: ${{ secrets.DEVELOPER_ID_INSTALLER_P12 }}
26+
P12_PASSWORD: ${{ secrets.P12_PASSWORD }}
27+
run: |
28+
# Create temporary keychain
29+
security create-keychain -p "$KEYCHAIN_PASSWORD" "$KEYCHAIN_PATH"
30+
security set-keychain-settings -lut 21600 "$KEYCHAIN_PATH"
31+
security unlock-keychain -p "$KEYCHAIN_PASSWORD" "$KEYCHAIN_PATH"
32+
33+
# Import Developer ID Application certificate (for app signing)
34+
echo "$DEVELOPER_ID_APPLICATION_P12" | base64 --decode > /tmp/app_cert.p12
35+
security import /tmp/app_cert.p12 \
36+
-P "$P12_PASSWORD" \
37+
-A \
38+
-t cert \
39+
-f pkcs12 \
40+
-k "$KEYCHAIN_PATH"
41+
42+
# Import Developer ID Installer certificate (for pkg signing)
43+
echo "$DEVELOPER_ID_INSTALLER_P12" | base64 --decode > /tmp/installer_cert.p12
44+
security import /tmp/installer_cert.p12 \
45+
-P "$P12_PASSWORD" \
46+
-A \
47+
-t cert \
48+
-f pkcs12 \
49+
-k "$KEYCHAIN_PATH"
50+
51+
# Add keychain to search list
52+
security list-keychains -d user -s "$KEYCHAIN_PATH" $(security list-keychains -d user | tr -d '"')
53+
security default-keychain -s "$KEYCHAIN_PATH"
54+
55+
# Allow codesign to access keychain without UI prompt
56+
security set-key-partition-list -S apple-tool:,apple:,codesign:,productsign: -s -k "$KEYCHAIN_PASSWORD" "$KEYCHAIN_PATH"
57+
58+
# Clean up cert files
59+
rm -f /tmp/app_cert.p12 /tmp/installer_cert.p12
1860
1961
- name: Archive App
2062
run: |
2163
xcodebuild -scheme abledex \
2264
-archivePath $PWD/build/abledex.xcarchive \
2365
-configuration Release \
2466
archive \
25-
CODE_SIGN_IDENTITY="-" \
26-
CODE_SIGNING_REQUIRED=NO
67+
CODE_SIGN_IDENTITY="Developer ID Application: Brett Henderson (94XUGF9CU7)" \
68+
OTHER_CODE_SIGN_FLAGS="--keychain $KEYCHAIN_PATH"
2769
2870
- name: Export App
2971
run: |
30-
# Creates a simple export options plist
3172
cat <<EOF > ExportOptions.plist
3273
<?xml version="1.0" encoding="UTF-8"?>
3374
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3475
<plist version="1.0">
3576
<dict>
3677
<key>method</key>
37-
<string>mac-application</string>
38-
<key>destination</key>
39-
<string>export</string>
78+
<string>developer-id</string>
4079
<key>signingStyle</key>
4180
<string>manual</string>
81+
<key>signingCertificate</key>
82+
<string>Developer ID Application: Brett Henderson (94XUGF9CU7)</string>
83+
<key>teamID</key>
84+
<string>94XUGF9CU7</string>
4285
</dict>
4386
</plist>
4487
EOF
4588
4689
xcodebuild -exportArchive \
4790
-archivePath $PWD/build/abledex.xcarchive \
4891
-exportOptionsPlist ExportOptions.plist \
49-
-exportPath $PWD/build \
50-
CODE_SIGN_IDENTITY="-" \
51-
CODE_SIGNING_REQUIRED=NO
92+
-exportPath $PWD/build
93+
94+
- name: Extract version from tag
95+
id: version
96+
run: echo "VERSION=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT"
5297

53-
- name: Zip Application
98+
- name: Store notarization credentials
99+
env:
100+
APPLE_ID: ${{ secrets.APPLE_ID }}
101+
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
54102
run: |
55-
cd build
56-
zip -r abledex.zip abledex.app
103+
xcrun notarytool store-credentials "notary-profile" \
104+
--apple-id "$APPLE_ID" \
105+
--password "$APPLE_ID_PASSWORD" \
106+
--team-id "94XUGF9CU7" \
107+
--keychain "$KEYCHAIN_PATH"
108+
109+
- name: Build, sign, notarize, and staple pkg
110+
run: |
111+
VERSION="${{ steps.version.outputs.VERSION }}"
112+
113+
# Build unsigned pkg
114+
pkgbuild \
115+
--component build/abledex.app \
116+
--install-location /Applications \
117+
--identifier computerdata.abledex \
118+
--version "$VERSION" \
119+
build/abledex-unsigned.pkg
120+
121+
# Sign pkg with Developer ID Installer certificate
122+
productsign \
123+
--sign "Developer ID Installer: Brett Henderson (94XUGF9CU7)" \
124+
--keychain "$KEYCHAIN_PATH" \
125+
build/abledex-unsigned.pkg \
126+
build/abledex.pkg
127+
128+
rm build/abledex-unsigned.pkg
129+
130+
# Notarize using stored credentials (avoids secrets in process args)
131+
xcrun notarytool submit build/abledex.pkg \
132+
--keychain-profile "notary-profile" \
133+
--keychain "$KEYCHAIN_PATH" \
134+
--wait
135+
136+
# Staple the notarization ticket
137+
xcrun stapler staple build/abledex.pkg
57138
58139
- name: Release
59140
uses: softprops/action-gh-release@v1
60141
with:
61-
files: build/abledex.zip
142+
files: build/abledex.pkg
62143
generate_release_notes: true
144+
145+
- name: Cleanup keychain
146+
if: always()
147+
run: security delete-keychain "$KEYCHAIN_PATH"

abledex.xcodeproj/project.pbxproj

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@
130130
attributes = {
131131
BuildIndependentTargetsInParallel = 1;
132132
LastSwiftUpdateCheck = 2600;
133-
LastUpgradeCheck = 2600;
133+
LastUpgradeCheck = 2620;
134134
TargetAttributes = {
135135
A60284F72EEE2E9D00893D52 = {
136136
CreatedOnToolsVersion = 26.0.1;
@@ -241,6 +241,7 @@
241241
CLANG_WARN_UNREACHABLE_CODE = YES;
242242
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
243243
COPY_PHASE_STRIP = NO;
244+
DEAD_CODE_STRIPPING = YES;
244245
DEBUG_INFORMATION_FORMAT = dwarf;
245246
DEVELOPMENT_TEAM = 94XUGF9CU7;
246247
ENABLE_STRICT_OBJC_MSGSEND = YES;
@@ -266,6 +267,7 @@
266267
MTL_FAST_MATH = YES;
267268
ONLY_ACTIVE_ARCH = YES;
268269
SDKROOT = macosx;
270+
STRING_CATALOG_GENERATE_SYMBOLS = YES;
269271
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)";
270272
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
271273
};
@@ -305,6 +307,7 @@
305307
CLANG_WARN_UNREACHABLE_CODE = YES;
306308
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
307309
COPY_PHASE_STRIP = NO;
310+
DEAD_CODE_STRIPPING = YES;
308311
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
309312
DEVELOPMENT_TEAM = 94XUGF9CU7;
310313
ENABLE_NS_ASSERTIONS = NO;
@@ -323,6 +326,7 @@
323326
MTL_ENABLE_DEBUG_INFO = NO;
324327
MTL_FAST_MATH = YES;
325328
SDKROOT = macosx;
329+
STRING_CATALOG_GENERATE_SYMBOLS = YES;
326330
SWIFT_COMPILATION_MODE = wholemodule;
327331
};
328332
name = Release;
@@ -335,7 +339,8 @@
335339
CODE_SIGN_ENTITLEMENTS = abledex/abledex.entitlements;
336340
CODE_SIGN_STYLE = Automatic;
337341
COMBINE_HIDPI_IMAGES = YES;
338-
CURRENT_PROJECT_VERSION = 2;
342+
CURRENT_PROJECT_VERSION = 3;
343+
DEAD_CODE_STRIPPING = YES;
339344
DEVELOPMENT_TEAM = 94XUGF9CU7;
340345
ENABLE_APP_SANDBOX = NO;
341346
ENABLE_HARDENED_RUNTIME = YES;
@@ -370,7 +375,8 @@
370375
CODE_SIGN_ENTITLEMENTS = abledex/abledex.entitlements;
371376
CODE_SIGN_STYLE = Automatic;
372377
COMBINE_HIDPI_IMAGES = YES;
373-
CURRENT_PROJECT_VERSION = 2;
378+
CURRENT_PROJECT_VERSION = 3;
379+
DEAD_CODE_STRIPPING = YES;
374380
DEVELOPMENT_TEAM = 94XUGF9CU7;
375381
ENABLE_APP_SANDBOX = NO;
376382
ENABLE_HARDENED_RUNTIME = YES;
@@ -403,6 +409,7 @@
403409
BUNDLE_LOADER = "$(TEST_HOST)";
404410
CODE_SIGN_STYLE = Automatic;
405411
CURRENT_PROJECT_VERSION = 1;
412+
DEAD_CODE_STRIPPING = YES;
406413
DEVELOPMENT_TEAM = 94XUGF9CU7;
407414
GENERATE_INFOPLIST_FILE = YES;
408415
MACOSX_DEPLOYMENT_TARGET = 15.6;
@@ -424,6 +431,7 @@
424431
BUNDLE_LOADER = "$(TEST_HOST)";
425432
CODE_SIGN_STYLE = Automatic;
426433
CURRENT_PROJECT_VERSION = 1;
434+
DEAD_CODE_STRIPPING = YES;
427435
DEVELOPMENT_TEAM = 94XUGF9CU7;
428436
GENERATE_INFOPLIST_FILE = YES;
429437
MACOSX_DEPLOYMENT_TARGET = 15.6;

0 commit comments

Comments
 (0)