@@ -3,8 +3,8 @@ name: Build and Release
33on :
44 push :
55 tags :
6- - ' v* '
7- - ' [0-9]*'
6+ - " v* "
7+ - " [0-9]*"
88 workflow_dispatch :
99
1010permissions :
@@ -20,10 +20,10 @@ jobs:
2020 - name : Install Qt
2121 uses : jurplel/install-qt-action@v4
2222 with :
23- version : ' 6.8'
24- host : ' linux'
25- target : ' desktop'
26- arch : ' linux_gcc_64'
23+ version : " 6.8"
24+ host : " linux"
25+ target : " desktop"
26+ arch : " linux_gcc_64"
2727
2828 - name : Install dependencies
2929 run : |
5757 cp build/src/vchar64 AppDir/usr/bin/
5858 cp moe.retro.vchar64.desktop AppDir/usr/share/applications/vchar64.desktop
5959 cp src/res/logo512.png AppDir/usr/share/icons/hicolor/512x512/apps/vchar64.png
60-
60+
6161 # Copy libxcb-cursor0 manually as it's required by Qt 6.5+ but often missing from older distros/linuxdeployqt bundles
6262 mkdir -p AppDir/usr/lib
6363 find /usr/lib -name "libxcb-cursor.so.0*" -exec cp {} AppDir/usr/lib/ \;
@@ -88,10 +88,10 @@ jobs:
8888 - name : Install Qt
8989 uses : jurplel/install-qt-action@v4
9090 with :
91- version : ' 6.8'
92- host : ' windows'
93- target : ' desktop'
94- arch : ' win64_msvc2022_64'
91+ version : " 6.8"
92+ host : " windows"
93+ target : " desktop"
94+ arch : " win64_msvc2022_64"
9595
9696 - name : Configure CMake
9797 run : cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=$env:QT_ROOT_DIR
@@ -126,10 +126,10 @@ jobs:
126126 - name : Install Qt
127127 uses : jurplel/install-qt-action@v4
128128 with :
129- version : ' 6.8'
130- host : ' mac'
131- target : ' desktop'
132- arch : ' clang_64'
129+ version : " 6.8"
130+ host : " mac"
131+ target : " desktop"
132+ arch : " clang_64"
133133
134134 - name : Install Ninja
135135 run : brew install ninja
@@ -140,10 +140,33 @@ jobs:
140140 - name : Build
141141 run : cmake --build build --config Release
142142
143- - name : Run macdeployqt
143+ - name : Import Signing Certificate
144+ env :
145+ MACOS_CERTIFICATE : ${{ secrets.MACOS_CERTIFICATE }}
146+ MACOS_CERTIFICATE_PWD : ${{ secrets.MACOS_CERTIFICATE_PWD }}
147+ KEYCHAIN_PWD : ${{ secrets.KEYCHAIN_PWD }}
148+ run : |
149+ echo "$MACOS_CERTIFICATE" | base64 --decode > certificate.p12
150+ security create-keychain -p "$KEYCHAIN_PWD" build.keychain
151+ security default-keychain -s build.keychain
152+ security unlock-keychain -p "$KEYCHAIN_PWD" build.keychain
153+ security import certificate.p12 -k build.keychain -P "$MACOS_CERTIFICATE_PWD" -T /usr/bin/codesign
154+ security set-key-partition-list -S apple-tool:,apple: -s -k "$KEYCHAIN_PWD" build.keychain
155+
156+ - name : Run macdeployqt and Sign
144157 run : |
145158 cd build/src
146- macdeployqt vchar64.app -dmg
159+ IDENTITY=$(security find-identity -v -p codesigning | grep "Developer ID Application" | head -1 | cut -d '"' -f 2)
160+ macdeployqt vchar64.app -dmg -sign="$IDENTITY"
161+
162+ - name : Notarize DMG
163+ env :
164+ APPLE_ID : ${{ secrets.APPLE_ID }}
165+ APPLE_PASSWORD : ${{ secrets.APPLE_PASSWORD }}
166+ APPLE_TEAM_ID : ${{ secrets.APPLE_TEAM_ID }}
167+ run : |
168+ xcrun notarytool submit build/src/vchar64.dmg --apple-id "$APPLE_ID" --password "$APPLE_PASSWORD" --team-id "$APPLE_TEAM_ID" --wait
169+ xcrun stapler staple build/src/vchar64.dmg
147170
148171 - name : Rename and Move DMG
149172 run : |
0 commit comments