Update build-macos-arm64.yml
This commit is contained in:
		
							parent
							
								
									82d9b033f2
								
							
						
					
					
						commit
						080b56a0cb
					
				
							
								
								
									
										57
									
								
								.github/workflows/build-macos-arm64.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										57
									
								
								.github/workflows/build-macos-arm64.yml
									
									
									
									
										vendored
									
									
								
							| @ -1,6 +1,9 @@ | ||||
| name: Flutter Nightly MacOS Arm64 Build | ||||
| 
 | ||||
| on: | ||||
|   schedule: | ||||
|     # schedule build every night | ||||
|     - cron: "0/6 * * * *" | ||||
|   workflow_dispatch: | ||||
| 
 | ||||
| env: | ||||
| @ -33,56 +36,8 @@ jobs: | ||||
|     name: build-for-macOS-arm64 | ||||
|     runs-on: [self-hosted, macOS, ARM64] | ||||
|     steps: | ||||
|       - name: Export GitHub Actions cache environment variables | ||||
|         uses: actions/github-script@v6 | ||||
|         with: | ||||
|           script: | | ||||
|             core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || ''); | ||||
|             core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || ''); | ||||
| 
 | ||||
|       - name: Checkout source code | ||||
|         uses: actions/checkout@v3 | ||||
| 
 | ||||
|       - name: Install flutter rust bridge deps | ||||
|       - name: Run | ||||
|         shell: bash | ||||
|         run: | | ||||
|           cargo install flutter_rust_bridge_codegen --version ${{ env.FLUTTER_RUST_BRIDGE_VERSION }} --features "uuid" | ||||
|           pushd flutter && flutter pub get && popd | ||||
|           ~/.cargo/bin/flutter_rust_bridge_codegen --rust-input ./src/flutter_ffi.rs --dart-output ./flutter/lib/generated_bridge.dart --c-output ./flutter/macos/Runner/bridge_generated.h | ||||
| 
 | ||||
|       - name: Build rustdesk | ||||
|         run: | | ||||
|           # --hwcodec not supported on macos yet | ||||
|           ./build.py --flutter | ||||
| 
 | ||||
|       - name: Codesign app and create signed dmg | ||||
|         if: env.MACOS_P12_BASE64 != null && env.UPLOAD_ARTIFACT == 'true' | ||||
|         run: | | ||||
|           # Patch create-dmg to give more attempts to unmount image | ||||
|           CREATE_DMG="$(command -v create-dmg)" | ||||
|           CREATE_DMG="$(readlink -f "$CREATE_DMG")" | ||||
|           sed -i -e 's/MAXIMUM_UNMOUNTING_ATTEMPTS=3/MAXIMUM_UNMOUNTING_ATTEMPTS=7/' "$CREATE_DMG" | ||||
|           # start sign the rustdesk.app and dmg | ||||
|           rm rustdesk-${{ env.VERSION }}.dmg || true | ||||
|           codesign --force --options runtime -s ${{ secrets.MACOS_CODESIGN_IDENTITY }} --deep --strict ./flutter/build/macos/Build/Products/Release/RustDesk.app -vvv | ||||
|           create-dmg --icon "RustDesk.app" 200 190 --hide-extension "RustDesk.app" --window-size 800 400 --app-drop-link 600 185 rustdesk-${{ env.VERSION }}.dmg ./flutter/build/macos/Build/Products/Release/RustDesk.app | ||||
|           codesign --force --options runtime -s ${{ secrets.MACOS_CODESIGN_IDENTITY }} --deep --strict rustdesk-${{ env.VERSION }}.dmg -vvv | ||||
|           # notarize the rustdesk-${{ env.VERSION }}.dmg | ||||
|           rcodesign notary-submit --api-key-path ~/.p12/api-key.json  --staple rustdesk-${{ env.VERSION }}.dmg | ||||
| 
 | ||||
|       - name: Rename rustdesk | ||||
|         if: env.UPLOAD_ARTIFACT == 'true' | ||||
|         run: | | ||||
|           for name in rustdesk*??.dmg; do | ||||
|               mv "$name" "${name%%.dmg}-aarch64.dmg" | ||||
|           done | ||||
| 
 | ||||
|       - name: Publish DMG package | ||||
|         if: env.UPLOAD_ARTIFACT == 'true' | ||||
|         uses: softprops/action-gh-release@v1 | ||||
|         with: | ||||
|           prerelease: true | ||||
|           tag_name: ${{ env.TAG_NAME }} | ||||
|           files: | | ||||
|             rustdesk*-aarch64.dmg | ||||
| 
 | ||||
|           cd /opt/build | ||||
|           ./agent.sh | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user