Skip to content

Commit

Permalink
Add release config
Browse files Browse the repository at this point in the history
  • Loading branch information
jdamcd committed Nov 27, 2023
1 parent c1ec568 commit 85761ab
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 11 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ jobs:

macOS:
name: macOS app
if: false
runs-on: macos-13
steps:

Expand All @@ -52,5 +51,4 @@ jobs:
run: |
xcodebuild -project macOS/Arrivals.xcodeproj \
-scheme Arrivals \
-destination 'platform=macOS' \
-configuration Debug
-configuration Debug build CONFIGURATION_BUILD_DIR=./target/
40 changes: 35 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,39 @@ jobs:
run: |
xcodebuild -project macOS/Arrivals.xcodeproj \
-scheme Arrivals \
-destination 'platform=macOS' \
-configuration Release
-configuration Release build CONFIGURATION_BUILD_DIR=./target/
# TODO
# - name: Sign
# - name: Upload Artifact
- name: Sign
env:
MACOS_CERTIFICATE: ${{ secrets.PROD_MACOS_CERTIFICATE }}
MACOS_CERTIFICATE_PWD: ${{ secrets.PROD_MACOS_CERTIFICATE_PWD }}
MACOS_CERTIFICATE_NAME: ${{ secrets.PROD_MACOS_CERTIFICATE_NAME }}
MACOS_CI_KEYCHAIN_PWD: ${{ secrets.PROD_MACOS_CI_KEYCHAIN_PWD }}
run: |
echo $MACOS_CERTIFICATE | base64 --decode > certificate.p12
security create-keychain -p "$MACOS_CI_KEYCHAIN_PWD" build.keychain
security default-keychain -s build.keychain
security unlock-keychain -p "$MACOS_CI_KEYCHAIN_PWD" build.keychain
security import certificate.p12 -k build.keychain -P "$MACOS_CERTIFICATE_PWD" -T /usr/bin/codesign
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "$MACOS_CI_KEYCHAIN_PWD" build.keychain
/usr/bin/codesign --force -s "$MACOS_CERTIFICATE_NAME" --options runtime macOS/target/Arrivals.app -v
- name: Notarize
env:
PROD_MACOS_NOTARIZATION_APPLE_ID: ${{ secrets.PROD_MACOS_NOTARIZATION_APPLE_ID }}
PROD_MACOS_NOTARIZATION_TEAM_ID: ${{ secrets.PROD_MACOS_NOTARIZATION_TEAM_ID }}
PROD_MACOS_NOTARIZATION_PWD: ${{ secrets.PROD_MACOS_NOTARIZATION_PWD }}
run: |
xcrun notarytool store-credentials "notarytool-profile" --apple-id "$PROD_MACOS_NOTARIZATION_APPLE_ID" --team-id "$PROD_MACOS_NOTARIZATION_TEAM_ID" --password "$PROD_MACOS_NOTARIZATION_PWD"
ditto -c -k --keepParent "macOS/target/Arrivals.app" "arrivals.zip"
xcrun notarytool submit "arrivals.zip" --keychain-profile "notarytool-profile" --wait
xcrun stapler staple "macOS/target/Arrivals.app"
- uses: actions/upload-artifact@v3
with:
name: Arrivals
path: macOS/target/Arrivals.app
10 changes: 7 additions & 3 deletions macOS/Arrivals.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -439,13 +439,15 @@
FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/../shared/build/xcode-frameworks/$(CONFIGURATION)/$(SDK_NAME)";
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = Arrivals/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = "TfL Arrivals";
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities";
INFOPLIST_KEY_LSUIElement = YES;
INFOPLIST_KEY_NSHumanReadableCopyright = "";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
);
MARKETING_VERSION = 1.0;
MARKETING_VERSION = 0.1;
OTHER_LDFLAGS = (
"$(inherited)",
"-framework",
Expand All @@ -466,6 +468,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = Arrivals/Arrivals.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "-";
CODE_SIGN_STYLE = Manual;
COMBINE_HIDPI_IMAGES = YES;
Expand All @@ -477,13 +480,15 @@
FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/../shared/build/xcode-frameworks/$(CONFIGURATION)/$(SDK_NAME)";
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = Arrivals/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = "TfL Arrivals";
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities";
INFOPLIST_KEY_LSUIElement = YES;
INFOPLIST_KEY_NSHumanReadableCopyright = "";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
);
MARKETING_VERSION = 1.0;
MARKETING_VERSION = 0.1;
OTHER_LDFLAGS = (
"$(inherited)",
"-framework",
Expand All @@ -492,7 +497,6 @@
PRODUCT_BUNDLE_IDENTIFIER = com.jdamcd.Arrivals;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
"PROVISIONING_PROFILE_SPECIFIER[sdk=macosx*]" = "";
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 5.0;
};
Expand Down

0 comments on commit 85761ab

Please sign in to comment.