diff --git a/polkadot/.gitlab-ci.yml b/polkadot/.gitlab-ci.yml
index d0c057b32cdbae73f7e95dc23cfe1aaa0ef060dc..5e0bf77eefe6f0d36545fd1618a134bf1c0b6b40 100644
--- a/polkadot/.gitlab-ci.yml
+++ b/polkadot/.gitlab-ci.yml
@@ -253,8 +253,8 @@ publish-s3-release:
     - echo "uploading objects to https://${BUCKET}/${PREFIX}/${VERSION}"
     - aws s3 sync ./artifacts/ s3://${BUCKET}/${PREFIX}/${VERSION}/
     - echo "update objects at https://${BUCKET}/${PREFIX}/${EXTRATAG}"
-    - for file in ./artifacts/*; do
-      name="$(basename ${file})";
+    - find ./artifacts -type f | while read file; do
+      name="${file#./artifacts/}";
       aws s3api copy-object
         --copy-source ${BUCKET}/${PREFIX}/${VERSION}/${name}
         --bucket ${BUCKET} --key ${PREFIX}/${EXTRATAG}/${name};