@@ -128,9 +128,9 @@ jobs:
128128 runs-on : ${{ matrix.job.os }}
129129 needs : create-release
130130 env :
131- MACOS_APP_RELEASE_PATH : frontend/appflowy_flutter/product /${{ github.ref_name }}/macos/Release
131+ MACOS_APP_RELEASE_PATH : frontend/appflowy_flutter/build /${{ github.ref_name }}
132132 MACOS_X86_ZIP_NAME : AppFlowy-${{ github.ref_name }}-macos-x86_64.zip
133- MACOS_DMG_NAME : AppFlowy-${{ github.ref_name }}-macos-x86_64
133+ MACOS_DMG_NAME : AppFlowy-${{ github.ref_name }}-macos-x86_64.dmg
134134 strategy :
135135 fail-fast : false
136136 matrix :
@@ -158,46 +158,16 @@ jobs:
158158 - name : Install prerequisites
159159 working-directory : frontend
160160 run : |
161+ brew install p7zip
161162 cargo install --force --locked cargo-make
162163 cargo install --force --locked duckscript_cli
163164
164165 - name : Build AppFlowy
165166 working-directory : frontend
166167 run : |
167168 flutter config --enable-macos-desktop
168- dart ./scripts/flutter_release_build/build_flowy.dart run . ${{ github.ref_name }}
169-
170- - name : Codesign AppFlowy
171- run : |
172- echo ${{ secrets.MACOS_CERTIFICATE }} | base64 --decode > certificate.p12
173- security create-keychain -p action build.keychain
174- security default-keychain -s build.keychain
175- security unlock-keychain -p action build.keychain
176- security import certificate.p12 -k build.keychain -P ${{ secrets.MACOS_CERTIFICATE_PWD }} -T /usr/bin/codesign
177- security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k action build.keychain
178- /usr/bin/codesign --force --options runtime --deep --sign "${{ secrets.MACOS_CODESIGN_ID }}" "${{ env.MACOS_APP_RELEASE_PATH }}/AppFlowy.app" -v
179-
180- - name : Create macOS dmg
181- run : |
182- brew install create-dmg
183- create-dmg \
184- --volname ${{ env.MACOS_DMG_NAME }} \
185- --hide-extension "AppFlowy.app" \
186- --background frontend/scripts/dmg_assets/AppFlowyInstallerBackground.jpg \
187- --window-size 600 450 \
188- --icon-size 94 \
189- --icon "AppFlowy.app" 141 249 \
190- --app-drop-link 458 249 \
191- "${{ env.MACOS_APP_RELEASE_PATH }}/${{ env.MACOS_DMG_NAME }}.dmg" \
192- "${{ env.MACOS_APP_RELEASE_PATH }}/AppFlowy.app"
193-
194- - name : Notarize AppFlowy
195- run : |
196- xcrun notarytool submit ${{ env.MACOS_APP_RELEASE_PATH }}/${{ env.MACOS_DMG_NAME }}.dmg --apple-id ${{ secrets.MACOS_NOTARY_USER }} --team-id ${{ secrets.MACOS_TEAM_ID }} --password ${{ secrets.MACOS_NOTARY_PWD }} -v -f "json" --wait
197-
198- - name : Archive Asset
199- working-directory : ${{ env.MACOS_APP_RELEASE_PATH }}
200- run : zip --symlinks -qr ${{ env.MACOS_X86_ZIP_NAME }} AppFlowy.app
169+ flutter pub global activate flutter_distributor
170+ sh scripts/flutter_release_build/build_macos.sh --build_type dmg --build_arch x86_64 --version ${{ github.ref_name }} --apple-id ${{ secrets.MACOS_NOTARY_USER }} --team-id ${{ secrets.MACOS_TEAM_ID }} --password ${{ secrets.MACOS_NOTARY_PWD }}
201171
202172 - name : Upload Asset
203173 uses : actions/upload-release-asset@v1
@@ -215,8 +185,8 @@ jobs:
215185 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
216186 with :
217187 upload_url : ${{ needs.create-release.outputs.upload_url }}
218- asset_path : ${{ env.MACOS_APP_RELEASE_PATH }}/${{ env.MACOS_DMG_NAME }}.dmg
219- asset_name : ${{ env.MACOS_DMG_NAME }}.dmg
188+ asset_path : ${{ env.MACOS_APP_RELEASE_PATH }}/${{ env.MACOS_DMG_NAME }}
189+ asset_name : ${{ env.MACOS_DMG_NAME }}
220190 asset_content_type : application/octet-stream
221191
222192 build-for-macOS-universal :
@@ -226,7 +196,7 @@ jobs:
226196 env :
227197 MACOS_APP_RELEASE_PATH : frontend/appflowy_flutter/product/${{ github.ref_name }}/macos/Release
228198 MACOS_AARCH64_ZIP_NAME : AppFlowy-${{ github.ref_name }}-macos-universal.zip
229- MACOS_DMG_NAME : AppFlowy-${{ github.ref_name }}-macos-universal
199+ MACOS_DMG_NAME : AppFlowy-${{ github.ref_name }}-macos-universal.dmg
230200 strategy :
231201 fail-fast : false
232202 matrix :
@@ -256,46 +226,16 @@ jobs:
256226 - name : Install prerequisites
257227 working-directory : frontend
258228 run : |
229+ brew install p7zip
259230 cargo install --force --locked cargo-make
260231 cargo install --force --locked duckscript_cli
261232
262233 - name : Build AppFlowy
263234 working-directory : frontend
264235 run : |
265236 flutter config --enable-macos-desktop
266- sh scripts/flutter_release_build/build_universal_package_for_macos.sh ${{ github.ref_name }}
267-
268- - name : Codesign AppFlowy
269- run : |
270- echo ${{ secrets.MACOS_CERTIFICATE }} | base64 --decode > certificate.p12
271- security create-keychain -p action build.keychain
272- security default-keychain -s build.keychain
273- security unlock-keychain -p action build.keychain
274- security import certificate.p12 -k build.keychain -P ${{ secrets.MACOS_CERTIFICATE_PWD }} -T /usr/bin/codesign
275- security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k action build.keychain
276- /usr/bin/codesign --force --options runtime --deep --sign "${{ secrets.MACOS_CODESIGN_ID }}" "${{ env.MACOS_APP_RELEASE_PATH }}/AppFlowy.app" -v
277-
278- - name : Create macOS dmg
279- run : |
280- brew install create-dmg
281- create-dmg \
282- --volname ${{ env.MACOS_DMG_NAME }} \
283- --hide-extension "AppFlowy.app" \
284- --background frontend/scripts/dmg_assets/AppFlowyInstallerBackground.jpg \
285- --window-size 600 450 \
286- --icon-size 94 \
287- --icon "AppFlowy.app" 141 249 \
288- --app-drop-link 458 249 \
289- "${{ env.MACOS_APP_RELEASE_PATH }}/${{ env.MACOS_DMG_NAME }}.dmg" \
290- "${{ env.MACOS_APP_RELEASE_PATH }}/AppFlowy.app"
291-
292- - name : Notarize AppFlowy
293- run : |
294- xcrun notarytool submit ${{ env.MACOS_APP_RELEASE_PATH }}/${{ env.MACOS_DMG_NAME }}.dmg --apple-id ${{ secrets.MACOS_NOTARY_USER }} --team-id ${{ secrets.MACOS_TEAM_ID }} --password ${{ secrets.MACOS_NOTARY_PWD }} -v -f "json" --wait
295-
296- - name : Archive Asset
297- working-directory : ${{ env.MACOS_APP_RELEASE_PATH }}
298- run : zip --symlinks -qr ${{ env.MACOS_AARCH64_ZIP_NAME }} AppFlowy.app
237+ dart pub global activate flutter_distributor
238+ sh scripts/flutter_release_build/build_macos.sh --build_type dmg --build_arch universal --version ${{ github.ref_name }} --apple-id ${{ secrets.MACOS_NOTARY_USER }} --team-id ${{ secrets.MACOS_TEAM_ID }} --password ${{ secrets.MACOS_NOTARY_PWD }}
299239
300240 - name : Upload Asset
301241 uses : actions/upload-release-asset@v1
@@ -313,8 +253,8 @@ jobs:
313253 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
314254 with :
315255 upload_url : ${{ needs.create-release.outputs.upload_url }}
316- asset_path : ${{ env.MACOS_APP_RELEASE_PATH }}/${{ env.MACOS_DMG_NAME }}.dmg
317- asset_name : ${{ env.MACOS_DMG_NAME }}.dmg
256+ asset_path : ${{ env.MACOS_APP_RELEASE_PATH }}/${{ env.MACOS_DMG_NAME }}
257+ asset_name : ${{ env.MACOS_DMG_NAME }}
318258 asset_content_type : application/octet-stream
319259
320260 build-for-linux :
0 commit comments