From b09b114aa483a7972e6a5c969868ea63ad3a36a2 Mon Sep 17 00:00:00 2001 From: Dan Crosby Date: Fri, 12 Jun 2026 13:57:58 -0700 Subject: [PATCH] Avoid reuploading unchanged Addressables bundles (#7175) --- ci/github_actions/upload_addressables.sh | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/ci/github_actions/upload_addressables.sh b/ci/github_actions/upload_addressables.sh index d265b219b9..04ab9a520e 100755 --- a/ci/github_actions/upload_addressables.sh +++ b/ci/github_actions/upload_addressables.sh @@ -44,13 +44,26 @@ echo "Target: s3://$DO_BUCKET/addressables/$BUILD_TARGET/" export AWS_ACCESS_KEY_ID="$ACCESS_KEY_ID" export AWS_SECRET_ACCESS_KEY="$SECRET_KEY" -# Sync bundles to Spaces -# --delete removes files in destination that don't exist in source -# --acl public-read makes files publicly accessible +# Sync bundles to Spaces. Addressable bundle filenames include content hashes, so a +# same-sized existing bundle is already the same content. Use --size-only to avoid +# re-uploading every rebuilt bundle just because Unity gave it a fresh local mtime. +# Metadata files keep stable names, so sync them again without --size-only below. +# +# --delete removes files in destination that don't exist in source. +# --acl public-read makes files publicly accessible. aws s3 sync "$SERVER_DATA" "s3://$DO_BUCKET/addressables/$BUILD_TARGET/" \ --endpoint-url "$DO_ENDPOINT" \ --acl public-read \ + --size-only \ --delete +aws s3 sync "$SERVER_DATA" "s3://$DO_BUCKET/addressables/$BUILD_TARGET/" \ + --endpoint-url "$DO_ENDPOINT" \ + --acl public-read \ + --exclude "*" \ + --include "*.bin" \ + --include "*.hash" \ + --include "*.json" + echo "Addressables upload complete" echo "Files available at: https://assets.eagle0.net/addressables/$BUILD_TARGET/"