From 23294484ded4e7b7994bc36d4f00444f0d8093ae Mon Sep 17 00:00:00 2001 From: rtm516 Date: Sun, 19 Mar 2023 15:08:51 +0000 Subject: [PATCH] Update downloads api publishing steps --- .github/workflows/build.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2d1c84670..0c88bf213 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -106,12 +106,16 @@ jobs: # Save the private key to a file echo "$DOWNLOADS_PRIVATE_KEY" > id_ecdsa chmod 600 id_ecdsa + # Set the project + project=geyser # Get the version from gradle.properties version=$(cat gradle.properties | grep -o "version=[0-9\\.]*" | cut -d"=" -f2) # Copy over artifacts - scp -B -o StrictHostKeyChecking=no -i id_ecdsa bootstrap/**/build/libs/Geyser-*.jar $DOWNLOADS_USERNAME@$DOWNLOADS_SERVER_IP:~/files/ + rsync -P -e "ssh -o StrictHostKeyChecking=no -i id_ecdsa" bootstrap/**/build/libs/Geyser-*.jar $DOWNLOADS_USERNAME@$DOWNLOADS_SERVER_IP:~/uploads/$project/$GITHUB_RUN_NUMBER/ # Run the build script - ssh -o StrictHostKeyChecking=no -i id_ecdsa $DOWNLOADS_USERNAME@$DOWNLOADS_SERVER_IP ./handleBuild.sh geyser $version $GITHUB_RUN_NUMBER $GITHUB_SHA + # Push the metadata + echo "{\"project\": \"$project\", \"version\": \"$version\", \"id\": $GITHUB_RUN_NUMBER, \"commit\": \"$GITHUB_SHA\"}" > metadata.json + rsync -P -e "ssh -o StrictHostKeyChecking=no -i id_ecdsa" metadata.json $DOWNLOADS_USERNAME@$DOWNLOADS_SERVER_IP:~/uploads/$project/$GITHUB_RUN_NUMBER/ - name: Notify Discord if: ${{ (success() || failure()) && github.repository == 'GeyserMC/Geyser' }}