@@ -391,6 +391,15 @@ jobs:
391
391
name : dist-artifacts
392
392
path : /tmp/dist-artifacts
393
393
394
+ - name : Prepare "latest" artifacts
395
+ run : |
396
+ cp -r /tmp/dist-artifacts /tmp/dist-artifacts-latest
397
+ # Replace the version with "latest" in the zip file name
398
+ find /tmp/dist-artifacts-latest -type f -name "*.zip" -exec bash -c 'mv "$1" "${1//${{ fromJSON(needs.ci.outputs.plugin).version }}/latest}"' _ {} \;
399
+ # TODO: remove, debug
400
+ ls -1 /tmp/dist-artifacts-latest
401
+ shell : bash
402
+
394
403
- name : Login to Google Cloud
395
404
uses :
google-github-actions/[email protected]
396
405
with :
@@ -405,11 +414,14 @@ jobs:
405
414
echo "gcs_artifacts_release_path_latest=$gcs_artifacts_release_base/latest"
406
415
echo "gcs_artifacts_release_path_tag=$gcs_artifacts_release_base/$plugin_version"
407
416
fn=$(basename ${{ needs.ci.outputs.gcs-universal-zip-url-commit }})
417
+ latest_fn=${fn//${{ fromJSON(needs.ci.outputs.plugin).version }}/latest}
408
418
if [ "${{ matrix.platform }}" == 'any' ]; then
409
419
echo "gcs_upload_glob=$fn*"
420
+ echo "gcs_upload_glob_latest=$latest_fn*"
410
421
else
411
422
# strip the extension (.zip) and append the platform instead
412
423
echo "gcs_upload_glob=${fn%.*}.${{ matrix.platform }}*"
424
+ echo "gcs_upload_glob_latest=${latest_fn%.*}.${{ matrix.platform }}*"
413
425
fi
414
426
} >> "$GITHUB_ENV"
415
427
shell : bash
@@ -426,8 +438,8 @@ jobs:
426
438
- name : Upload GCS release artifact (latest)
427
439
uses :
google-github-actions/[email protected]
428
440
with :
429
- path : /tmp/dist-artifacts
430
- glob : ${{ env.gcs_upload_glob }}
441
+ path : /tmp/dist-artifacts-latest
442
+ glob : ${{ env.gcs_upload_glob_latest }}
431
443
destination : " ${{ env.gcs_artifacts_release_path_latest }}/${{ matrix.platform }}"
432
444
parent : false
433
445
process_gcloudignore : false
0 commit comments