Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 18 additions & 24 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Cache DerivedData (Release)
uses: actions/cache@v4
with:
path: ~/Library/Developer/Xcode/DerivedData
key: ${{ runner.os }}-derived-data-release-${{ hashFiles('perch.xcodeproj/project.pbxproj') }}
restore-keys: |
Comment on lines +30 to +32
${{ runner.os }}-derived-data-release-

- name: Resolve version
id: version
run: |
Expand All @@ -47,24 +55,6 @@ jobs:
echo "is_beta=$IS_BETA" >> "$GITHUB_OUTPUT"
echo "bundle_name=$BUNDLE_NAME" >> "$GITHUB_OUTPUT"

- name: Build arm64 archive
run: |
set -o pipefail
xcodebuild archive \
-scheme "$SCHEME" \
-configuration Release \
-archivePath build/$APP_NAME-arm64.xcarchive \
-destination 'generic/platform=macOS' \
-skipPackagePluginValidation \
-skipMacroValidation \
ARCHS=arm64 \
ONLY_ACTIVE_ARCH=NO \
CODE_SIGN_IDENTITY="-" \
CODE_SIGNING_REQUIRED=NO \
CODE_SIGNING_ALLOWED=NO \
MARKETING_VERSION="${{ steps.version.outputs.base_version }}" \
SKIP_INSTALL=NO 2>&1 | tail -100

- name: Build universal archive
run: |
set -o pipefail
Expand All @@ -83,6 +73,16 @@ jobs:
MARKETING_VERSION="${{ steps.version.outputs.base_version }}" \
SKIP_INSTALL=NO 2>&1 | tail -100

- name: Create arm64 archive from universal (lipo thin)
run: |
set -euo pipefail
cp -Rp "build/$APP_NAME-universal.xcarchive" "build/$APP_NAME-arm64.xcarchive"
find "build/$APP_NAME-arm64.xcarchive/Products" -type f | while read f; do
lipo "$f" -thin arm64 -output "$f"
fi
done
echo "Created arm64 archive from universal via lipo"

- name: Create x86_64 archive from universal (lipo thin)
run: |
cp -Rp "build/$APP_NAME-universal.xcarchive" "build/$APP_NAME-x86_64.xcarchive"
Expand Down Expand Up @@ -116,12 +116,6 @@ jobs:
mkdir -p "$STAGING"
cp -R "$APP" "$STAGING/${BUNDLE_NAME}.app"

codesign --force --deep --sign - --timestamp=none "$STAGING/${BUNDLE_NAME}.app"
codesign --verify --deep --strict --verbose=4 "$STAGING/${BUNDLE_NAME}.app"
if ! spctl --assess --type execute --verbose=4 "$STAGING/${BUNDLE_NAME}.app"; then
echo "::warning::spctl rejected ad-hoc signed app for ${ARCH}; continuing."
fi

hdiutil create \
-volname "Perch" \
-srcfolder "$STAGING" \
Expand Down
Loading