From 0164d219b8b365efd4d1ad092a1c8c5aa9e96931 Mon Sep 17 00:00:00 2001 From: jamelreid Date: Fri, 4 Feb 2022 08:16:41 -0500 Subject: [PATCH] Updated asset index --- .github/workflows/scripts/fetch-asset-id.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/scripts/fetch-asset-id.js b/.github/workflows/scripts/fetch-asset-id.js index 22ffb7aaa29..3e60d813919 100644 --- a/.github/workflows/scripts/fetch-asset-id.js +++ b/.github/workflows/scripts/fetch-asset-id.js @@ -31,8 +31,9 @@ const fetchAssetId = () => { } ); response.on( 'end', () => { - const parsedBody = JSON.parse( responseBody ); - resolve( parsedBody[0].id ); + const assets = JSON.parse( responseBody ); + // use the most recently uploaded asset + resolve( assets[ assets.length - 1 ].id ); } ); } );