diff --git a/.github/workflows/e2e-testing.yml b/.github/workflows/e2e-testing.yml index 1033765601..126a4e6e94 100644 --- a/.github/workflows/e2e-testing.yml +++ b/.github/workflows/e2e-testing.yml @@ -25,7 +25,7 @@ jobs: javaVersion: '18' - mcVersion: '1.19.4' javaVersion: '19' - - mcVersion: '1.20.1' + - mcVersion: 'latest' javaVersion: '20' steps: @@ -48,10 +48,16 @@ jobs: - name: Download ${{ matrix.mcVersion }} Paper run: | VERSION="${{ matrix.mcVersion }}" + if [ "$VERSION" == "latest" ]; then + VERSION=$(curl https://api.papermc.io/v2/projects/paper/ -s | jq -r '.versions[-1]') + fi + BUILD_JAR=$(curl -s "https://api.papermc.io/v2/projects/paper/versions/$VERSION/builds" \ | jq '.builds[-1] | "\(.build) \(.downloads.application.name)"' -r) BUILD=$(echo "$BUILD_JAR" | awk '{print $1}') JAR_FILE=$(echo "$BUILD_JAR" | awk '{print $2}') + + echo "Downloading... https://api.papermc.io/v2/projects/paper/versions/$VERSION/builds/$BUILD/downloads/$JAR_FILE" curl -o paper.jar \ "https://api.papermc.io/v2/projects/paper/versions/$VERSION/builds/$BUILD/downloads/$JAR_FILE"