diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 24b39d3..fd5b191 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -46,10 +46,7 @@ jobs: - name: Build code run: make release - - name: Run check - run: make check - - - name: Build ZIP + - name: Build and notarize distribution run: | make dist (cd build && echo "DIST=$(echo *.zip)" >>$GITHUB_ENV) diff --git a/Makefile b/Makefile index d658135..150f3fc 100644 --- a/Makefile +++ b/Makefile @@ -1,21 +1,30 @@ VERSION=$(shell cat VERSION) +NOTARIZATION_PROFILE="App Store Connect - Notarization API Key" all: adhoc adhoc: - @xcodebuild -quiet -target qlview-adhoc -configuration Release + xcodebuild -quiet -target qlview-adhoc -configuration Release release: - @xcodebuild -quiet -target qlview-signed -configuration Release - -check: release + xcodebuild -quiet -target qlview-signed -configuration Release codesign --verify --verbose build/Release/qlview - spctl --assess --verbose build/Release/qlview -dist: release - @rm -rf build/dist - @mkdir -p build/dist +check: + +zip: + rm -rf build/dist + mkdir -p build/dist cp -R build/Release/qlview build/dist cd build/dist && zip -r ../qlview-$(VERSION).zip * - @ls build/*.zip + ls build/*.zip | sed 's/^/> /' + +notarize: + xcrun notarytool submit --keychain-profile $(NOTARIZATION_PROFILE) --wait --timeout 10m build/qlview-$(VERSION).zip + spctl --assess --verbose build/qlview-$(VERSION).zip + +dist: zip notarize + +clean: + rm -rf build diff --git a/qlview.xcodeproj/project.pbxproj b/qlview.xcodeproj/project.pbxproj index c7598b1..bf6587d 100644 --- a/qlview.xcodeproj/project.pbxproj +++ b/qlview.xcodeproj/project.pbxproj @@ -203,13 +203,16 @@ isa = XCBuildConfiguration; buildSettings = { CLANG_ENABLE_MODULES = YES; + "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Developer ID Application"; CODE_SIGN_INJECT_BASE_ENTITLEMENTS = NO; - CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = 4UJK727T59; + CODE_SIGN_STYLE = Manual; + DEVELOPMENT_TEAM = ""; + "DEVELOPMENT_TEAM[sdk=macosx*]" = 4UJK727T59; ENABLE_HARDENED_RUNTIME = YES; OTHER_CODE_SIGN_FLAGS = "--timestamp"; "PRODUCT_BUNDLE_IDENTIFIER[sdk=macosx*]" = org.rsmmr.qlview; PRODUCT_NAME = qlview; + PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; }; @@ -219,13 +222,16 @@ isa = XCBuildConfiguration; buildSettings = { CLANG_ENABLE_MODULES = YES; + "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Developer ID Application"; CODE_SIGN_INJECT_BASE_ENTITLEMENTS = NO; - CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = 4UJK727T59; + CODE_SIGN_STYLE = Manual; + DEVELOPMENT_TEAM = ""; + "DEVELOPMENT_TEAM[sdk=macosx*]" = 4UJK727T59; ENABLE_HARDENED_RUNTIME = YES; OTHER_CODE_SIGN_FLAGS = "--timestamp"; "PRODUCT_BUNDLE_IDENTIFIER[sdk=macosx*]" = org.rsmmr.qlview; PRODUCT_NAME = qlview; + PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_VERSION = 5.0; }; name = Release;