Skip to content

Commit 7fc4ff6

Browse files
committed
Fix macos signing
1 parent 226e1a1 commit 7fc4ff6

File tree

2 files changed

+17
-11
lines changed

2 files changed

+17
-11
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,19 +73,19 @@ jobs:
7373
p12-file-base64: ${{ secrets.MACOS_CERTIFICATE }}
7474
p12-password: ${{ secrets.MACOS_CERTIFICATE_PWD }}
7575

76-
- run: make target/gyroflow-ofx-macosx.zip
76+
- run: make target/gyroflow-ofx-macosx.dmg
7777
env:
7878
SIGNING_FINGERPRINT: ${{ secrets.MACOS_CERTIFICATE_FINGERPRINT }}
7979
- name: Notarize and staple release build
8080
run: |
81-
npx notarize-cli --file target/gyroflow-ofx-macosx.zip --bundle-id xyz.gyroflow.ofx --asc-provider="${{ secrets.MACOS_TEAM }}" --username="${{ secrets.MACOS_ACCOUNT_USER }}" --password="${{ secrets.MACOS_ACCOUNT_PASS }}"
82-
xcrun stapler staple --verbose target/gyroflow-ofx-macosx.zip
81+
npx notarize-cli --file target/gyroflow-ofx-macosx.dmg --bundle-id xyz.gyroflow.ofx --asc-provider="${{ secrets.MACOS_TEAM }}" --username="${{ secrets.MACOS_ACCOUNT_USER }}" --password="${{ secrets.MACOS_ACCOUNT_PASS }}"
82+
xcrun stapler staple --verbose target/gyroflow-ofx-macosx.dmg
8383
8484
- name: Release
8585
uses: softprops/action-gh-release@v1
8686
if: startsWith(github.ref, 'refs/tags/')
8787
with:
88-
files: target/gyroflow-ofx-macosx.zip
88+
files: target/gyroflow-ofx-macosx.dmg
8989
env:
9090
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
9191

Makefile

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,25 @@ target/gyroflow-ofx-linux.zip: target/release/libgyroflow_ofx.so LICENSE README.
1010
cp target/bundle-common/Info.plist LICENSE README.md target/gyroflow-ofx-linux/GyroFlow.ofx.bundle/Contents/
1111
cd target/gyroflow-ofx-linux && zip -r ../gyroflow-ofx-linux.zip .
1212

13-
target/gyroflow-ofx-macosx.zip: target/x86_64-apple-darwin/release/libgyroflow_ofx.dylib target/aarch64-apple-darwin/release/libgyroflow_ofx.dylib LICENSE README.md target/bundle-common/Info.plist Makefile
13+
target/gyroflow-ofx-macosx.dmg: target/x86_64-apple-darwin/release/libgyroflow_ofx.dylib target/aarch64-apple-darwin/release/libgyroflow_ofx.dylib LICENSE README.md target/bundle-common/Info.plist Makefile
1414
rm -Rf target/gyroflow-ofx-macosx
15-
rm -f target/gyroflow-ofx-macosx.zip
15+
rm -f target/gyroflow-ofx-macosx.dmg
1616
mkdir -p target/gyroflow-ofx-macosx/GyroFlow.ofx.bundle/Contents/MacOS
17-
lipo target/{x86_64,aarch64}-apple-darwin/release/libgyroflow_ofx.dylib -create -output target/gyroflow-ofx-macosx/GyroFlow.ofx.bundle/Contents/MacOS/GyroFlow.ofx
17+
18+
lipo target/{x86_64,aarch64}-apple-darwin/release/libgyroflow_ofx.dylib -create -output target/gyroflow-ofx-macosx/GyroFlow.ofx.bundle/Contents/MacOS/GyroFlow.dylib
1819
cp target/bundle-common/Info.plist LICENSE README.md target/gyroflow-ofx-macosx/GyroFlow.ofx.bundle/Contents/
1920

20-
codesign -vvvv --strict --options=runtime --timestamp --force -s ${SIGNING_FINGERPRINT} target/gyroflow-ofx-macosx/GyroFlow.ofx.bundle/Contents/MacOS/GyroFlow.ofx
21+
codesign -vvvv --strict --options=runtime --timestamp --force -s ${SIGNING_FINGERPRINT} target/gyroflow-ofx-macosx/GyroFlow.ofx.bundle/Contents/MacOS/GyroFlow.dylib
22+
mv target/gyroflow-ofx-macosx/GyroFlow.ofx.bundle/Contents/MacOS/GyroFlow.dylib target/gyroflow-ofx-macosx/GyroFlow.ofx.bundle/Contents/MacOS/GyroFlow.ofx
23+
24+
codesign -vvvv --deep --strict --options=runtime --timestamp --force -s ${SIGNING_FINGERPRINT} target/gyroflow-ofx-macosx/GyroFlow.ofx.bundle
25+
codesign -vvvv --deep --verify target/gyroflow-ofx-macosx/GyroFlow.ofx.bundle
2126

22-
cd target/gyroflow-ofx-macosx && zip -r ../gyroflow-ofx-macosx.zip .
27+
ln -sf /Library/OFX/Plugins "target/gyroflow-ofx-macosx/"
28+
hdiutil create "target/gyroflow-ofx-macosx.dmg" -volname "Gyroflow-ofx" -fs HFS+ -srcfolder "target/gyroflow-ofx-macosx/" -ov -format UDZO -imagekey zlib-level=9
2329

24-
codesign -vvvv --strict --options=runtime --timestamp --force -s ${SIGNING_FINGERPRINT} ../gyroflow-ofx-macosx.zip
25-
codesign -vvvv --deep --verify ../gyroflow-ofx-macosx.zip
30+
codesign -vvvv --strict --options=runtime --timestamp --force -s ${SIGNING_FINGERPRINT} target/gyroflow-ofx-macosx.dmg
31+
codesign -vvvv --deep --verify target/gyroflow-ofx-macosx.dmg
2632

2733
target/gyroflow-ofx-windows.zip: target/release/gyroflow_ofx.dll LICENSE README.md target/bundle-common/Info.plist Makefile
2834
rm -Rf target/gyroflow-ofx-windows

0 commit comments

Comments
 (0)