improved release pipeline
This commit is contained in:
		
							
								
								
									
										4
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							| @@ -24,8 +24,10 @@ build/ | ||||
| #Clean files from setup.py | ||||
| src/lib/discord_game_sdk/ | ||||
|  | ||||
| # release.py | ||||
| # release | ||||
| release/ | ||||
| project/export/ | ||||
|  | ||||
| # venv | ||||
| venv/ | ||||
|  | ||||
|   | ||||
										
											Binary file not shown.
										
									
								
							| @@ -9,7 +9,7 @@ Button/styles/focus = SubResource("StyleBoxEmpty_1t7mm") | ||||
|  | ||||
| [sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_5vqdt"] | ||||
|  | ||||
| [sub_resource type="Image" id="Image_jkad7"] | ||||
| [sub_resource type="Image" id="Image_v4whe"] | ||||
| data = { | ||||
| "data": PackedByteArray(255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 227, 227, 227, 36, 224, 224, 224, 168, 224, 224, 224, 233, 224, 224, 224, 236, 224, 224, 224, 170, 231, 231, 231, 31, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 227, 227, 227, 36, 224, 224, 224, 234, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 239, 230, 230, 230, 30, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 168, 224, 224, 224, 255, 224, 224, 224, 186, 224, 224, 224, 32, 224, 224, 224, 33, 224, 224, 224, 187, 224, 224, 224, 255, 225, 225, 225, 167, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 237, 224, 224, 224, 255, 224, 224, 224, 33, 255, 255, 255, 0, 255, 255, 255, 0, 227, 227, 227, 36, 224, 224, 224, 255, 224, 224, 224, 234, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 237, 224, 224, 224, 255, 224, 224, 224, 33, 255, 255, 255, 0, 255, 255, 255, 0, 229, 229, 229, 38, 224, 224, 224, 255, 224, 224, 224, 229, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 164, 224, 224, 224, 255, 224, 224, 224, 187, 225, 225, 225, 34, 227, 227, 227, 36, 224, 224, 224, 192, 224, 224, 224, 255, 224, 224, 224, 162, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 24, 225, 225, 225, 215, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 229, 224, 224, 224, 32, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 24, 224, 224, 224, 216, 224, 224, 224, 255, 224, 224, 224, 210, 224, 224, 224, 161, 224, 224, 224, 232, 224, 224, 224, 231, 225, 225, 225, 159, 230, 230, 230, 30, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 107, 224, 224, 224, 255, 224, 224, 224, 210, 230, 230, 230, 20, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 105, 230, 230, 230, 20, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 221, 224, 224, 224, 130, 255, 255, 255, 1, 255, 255, 255, 1, 225, 225, 225, 134, 224, 224, 224, 224, 225, 225, 225, 223, 224, 224, 224, 132, 255, 255, 255, 1, 255, 255, 255, 6, 224, 224, 224, 137, 224, 224, 224, 231, 224, 224, 224, 255, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 130, 225, 225, 225, 133, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 129, 224, 224, 224, 137, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 65, 224, 224, 224, 255, 224, 224, 224, 220, 225, 225, 225, 223, 224, 224, 224, 255, 226, 226, 226, 61, 224, 224, 224, 65, 224, 224, 224, 255, 224, 224, 224, 222, 224, 224, 224, 231, 224, 224, 224, 255, 227, 227, 227, 62, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 225, 225, 225, 67, 224, 224, 224, 255, 224, 224, 224, 219, 224, 224, 224, 222, 224, 224, 224, 255, 227, 227, 227, 63, 225, 225, 225, 67, 224, 224, 224, 255, 224, 224, 224, 219, 224, 224, 224, 230, 224, 224, 224, 255, 227, 227, 227, 63, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 225, 225, 225, 127, 224, 224, 224, 129, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 225, 225, 225, 126, 225, 225, 225, 135, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 221, 225, 225, 225, 127, 255, 255, 255, 0, 255, 255, 255, 1, 224, 224, 224, 128, 224, 224, 224, 220, 224, 224, 224, 219, 225, 225, 225, 127, 255, 255, 255, 0, 255, 255, 255, 5, 225, 225, 225, 134, 224, 224, 224, 229, 224, 224, 224, 255, 255, 255, 255, 0), | ||||
| "format": "RGBA8", | ||||
| @@ -19,7 +19,7 @@ data = { | ||||
| } | ||||
|  | ||||
| [sub_resource type="ImageTexture" id="ImageTexture_gdtpn"] | ||||
| image = SubResource("Image_jkad7") | ||||
| image = SubResource("Image_v4whe") | ||||
|  | ||||
| [sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_7v0rg"] | ||||
|  | ||||
|   | ||||
| @@ -8,7 +8,7 @@ custom_features="" | ||||
| export_filter="all_resources" | ||||
| include_filter="" | ||||
| exclude_filter="" | ||||
| export_path="../../eexport/windows/discord-sdk-godot-demo.exe" | ||||
| export_path="export/windows/discord-sdk-godot-demo.exe" | ||||
| encryption_include_filters="" | ||||
| encryption_exclude_filters="" | ||||
| encrypt_pck=false | ||||
| @@ -42,6 +42,7 @@ application/product_name="" | ||||
| application/file_description="Discord SDK Godot Test" | ||||
| application/copyright="" | ||||
| application/trademarks="" | ||||
| application/export_angle=0 | ||||
| ssh_remote_deploy/enabled=false | ||||
| ssh_remote_deploy/host="user@host_ip" | ||||
| ssh_remote_deploy/port="22" | ||||
| @@ -70,7 +71,7 @@ custom_features="" | ||||
| export_filter="all_resources" | ||||
| include_filter="" | ||||
| exclude_filter="" | ||||
| export_path="../../eexport/linux/discord-sdk-godot-demo.x86_64" | ||||
| export_path="export/linux/discord-sdk-godot-demo.x86_64" | ||||
| encryption_include_filters="" | ||||
| encryption_exclude_filters="" | ||||
| encrypt_pck=false | ||||
| @@ -99,3 +100,108 @@ unzip -o -q \"{temp_dir}/{archive_name}\" -d \"{temp_dir}\" | ||||
| ssh_remote_deploy/cleanup_script="#!/usr/bin/env bash | ||||
| kill $(pgrep -x -f \"{temp_dir}/{exe_name} {cmd_args}\") | ||||
| rm -rf \"{temp_dir}\"" | ||||
|  | ||||
| [preset.2] | ||||
|  | ||||
| name="macOS" | ||||
| platform="macOS" | ||||
| runnable=true | ||||
| dedicated_server=false | ||||
| custom_features="" | ||||
| export_filter="all_resources" | ||||
| include_filter="" | ||||
| exclude_filter="" | ||||
| export_path="export/macos/discord-sdk-godot-demo.zip" | ||||
| encryption_include_filters="" | ||||
| encryption_exclude_filters="" | ||||
| encrypt_pck=false | ||||
| encrypt_directory=false | ||||
|  | ||||
| [preset.2.options] | ||||
|  | ||||
| export/distribution_type=0 | ||||
| binary_format/architecture="universal" | ||||
| custom_template/debug="" | ||||
| custom_template/release="" | ||||
| debug/export_console_wrapper=1 | ||||
| application/icon="" | ||||
| application/icon_interpolation=4 | ||||
| application/bundle_identifier="com.vaporvee.discord-sdk-godot-demo" | ||||
| application/signature="" | ||||
| application/app_category="Games" | ||||
| application/short_version="" | ||||
| application/version="" | ||||
| application/copyright="" | ||||
| application/copyright_localized={} | ||||
| application/min_macos_version="10.12" | ||||
| application/export_angle=0 | ||||
| display/high_res=true | ||||
| xcode/platform_build="14C18" | ||||
| xcode/sdk_version="13.1" | ||||
| xcode/sdk_build="22C55" | ||||
| xcode/sdk_name="macosx13.1" | ||||
| xcode/xcode_version="1420" | ||||
| xcode/xcode_build="14C18" | ||||
| codesign/codesign=1 | ||||
| codesign/installer_identity="" | ||||
| codesign/apple_team_id="" | ||||
| codesign/identity="" | ||||
| codesign/entitlements/custom_file="" | ||||
| codesign/entitlements/allow_jit_code_execution=false | ||||
| codesign/entitlements/allow_unsigned_executable_memory=false | ||||
| codesign/entitlements/allow_dyld_environment_variables=false | ||||
| codesign/entitlements/disable_library_validation=false | ||||
| codesign/entitlements/audio_input=false | ||||
| codesign/entitlements/camera=false | ||||
| codesign/entitlements/location=false | ||||
| codesign/entitlements/address_book=false | ||||
| codesign/entitlements/calendars=false | ||||
| codesign/entitlements/photos_library=false | ||||
| codesign/entitlements/apple_events=false | ||||
| codesign/entitlements/debugging=false | ||||
| codesign/entitlements/app_sandbox/enabled=false | ||||
| codesign/entitlements/app_sandbox/network_server=false | ||||
| codesign/entitlements/app_sandbox/network_client=false | ||||
| codesign/entitlements/app_sandbox/device_usb=false | ||||
| codesign/entitlements/app_sandbox/device_bluetooth=false | ||||
| codesign/entitlements/app_sandbox/files_downloads=0 | ||||
| codesign/entitlements/app_sandbox/files_pictures=0 | ||||
| codesign/entitlements/app_sandbox/files_music=0 | ||||
| codesign/entitlements/app_sandbox/files_movies=0 | ||||
| codesign/entitlements/app_sandbox/files_user_selected=0 | ||||
| codesign/entitlements/app_sandbox/helper_executables=[] | ||||
| codesign/custom_options=PackedStringArray() | ||||
| notarization/notarization=0 | ||||
| privacy/microphone_usage_description="" | ||||
| privacy/microphone_usage_description_localized={} | ||||
| privacy/camera_usage_description="" | ||||
| privacy/camera_usage_description_localized={} | ||||
| privacy/location_usage_description="" | ||||
| privacy/location_usage_description_localized={} | ||||
| privacy/address_book_usage_description="" | ||||
| privacy/address_book_usage_description_localized={} | ||||
| privacy/calendar_usage_description="" | ||||
| privacy/calendar_usage_description_localized={} | ||||
| privacy/photos_library_usage_description="" | ||||
| privacy/photos_library_usage_description_localized={} | ||||
| privacy/desktop_folder_usage_description="" | ||||
| privacy/desktop_folder_usage_description_localized={} | ||||
| privacy/documents_folder_usage_description="" | ||||
| privacy/documents_folder_usage_description_localized={} | ||||
| privacy/downloads_folder_usage_description="" | ||||
| privacy/downloads_folder_usage_description_localized={} | ||||
| privacy/network_volumes_usage_description="" | ||||
| privacy/network_volumes_usage_description_localized={} | ||||
| privacy/removable_volumes_usage_description="" | ||||
| privacy/removable_volumes_usage_description_localized={} | ||||
| ssh_remote_deploy/enabled=false | ||||
| ssh_remote_deploy/host="user@host_ip" | ||||
| ssh_remote_deploy/port="22" | ||||
| ssh_remote_deploy/extra_args_ssh="" | ||||
| ssh_remote_deploy/extra_args_scp="" | ||||
| ssh_remote_deploy/run_script="#!/usr/bin/env bash | ||||
| unzip -o -q \"{temp_dir}/{archive_name}\" -d \"{temp_dir}\" | ||||
| open \"{temp_dir}/{exe_name}.app\" --args {cmd_args}" | ||||
| ssh_remote_deploy/cleanup_script="#!/usr/bin/env bash | ||||
| kill $(pgrep -x -f \"{temp_dir}/{exe_name}.app/Contents/MacOS/{exe_name} {cmd_args}\") | ||||
| rm -rf \"{temp_dir}\"" | ||||
|   | ||||
							
								
								
									
										35
									
								
								release.py
									
									
									
									
									
								
							
							
						
						
									
										35
									
								
								release.py
									
									
									
									
									
								
							| @@ -1,26 +1,37 @@ | ||||
| import os | ||||
| from distutils.dir_util import copy_tree | ||||
| import shutil | ||||
| from distutils.dir_util import copy_tree | ||||
|  | ||||
| folder_path = "project/addons/discord-sdk-gd/bin/windows" | ||||
|  | ||||
| # Filter files that end with 'TMP' or 'exp' or 'lib' | ||||
| matching_files = [ | ||||
|     file for file in os.listdir(folder_path) if file.endswith(("TMP", "exp", "lib")) | ||||
| ] | ||||
| win_folder_path = "project/addons/discord-sdk-gd/bin/windows" | ||||
|  | ||||
| matching_files = [file for file in os.listdir(win_folder_path) if file.endswith(("TMP", "exp", "lib"))] | ||||
| for file in matching_files: | ||||
|     file_path = os.path.join(folder_path, file) | ||||
|     file_path = os.path.join(win_folder_path, file) | ||||
|     os.remove(file_path) | ||||
|  | ||||
| if os.path.exists("release/ADDON-Discord-SDK-Godot/addons"): | ||||
|     shutil.rmtree("release/ADDON-Discord-SDK-Godot/addons", ignore_errors=True) | ||||
|  | ||||
| copy_tree("project/addons/", "release/temp/ADDON-Discord-SDK-Godot/addons") | ||||
| open( | ||||
|     "release/temp/ADDON-Discord-SDK-Godot/addons/discord-sdk-gd/bin/.gdignore", "a" | ||||
| ).close() | ||||
|  | ||||
| shutil.make_archive("release/ADDON-Discord-SDK-Godot", "zip", "release/temp/") | ||||
| open("release/temp/ADDON-Discord-SDK-Godot/addons/discord-sdk-gd/bin/.gdignore", "a").close() | ||||
|  | ||||
| shutil.make_archive('release/ADDON-Discord-SDK-Godot', 'zip', 'release/temp/') | ||||
|  | ||||
| shutil.rmtree("release/temp/") | ||||
| # Export Demos | ||||
| os.system("cd project && godot --headless --export-release \"Linux/X11\"") | ||||
| os.system("cd project && godot --headless --export-release \"Windows Desktop\"") | ||||
| os.system("cd project && godot --headless --export-release \"macOS\"") | ||||
|  | ||||
| temp_dir = "release/temp_export_dir" | ||||
| os.makedirs(temp_dir, exist_ok=True) | ||||
|  | ||||
| for platform in ["windows", "linux", "macos"]: | ||||
|     shutil.copytree(f"project/export/{platform}", os.path.join(temp_dir, platform)) | ||||
|  | ||||
| shutil.make_archive('release/Demo-Export', 'zip', temp_dir) | ||||
|  | ||||
| shutil.rmtree(temp_dir) | ||||
|  | ||||
| print("ADDON-Discord-SDK-Godot.zip and Demo-Export.zip have been created successfully.") | ||||
|   | ||||
		Reference in New Issue
	
	Block a user