diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6fd3b518..7da20943 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,7 +4,6 @@ on: - master env: - JAVA_DISTRIBUTION: zulu JAVA_VERSION: 22.0.2+9 GRADLE_OPTS: -Dorg.gradle.daemon=false @@ -18,10 +17,18 @@ jobs: fetch-depth: 0 persist-credentials: false submodules: true + - name: Download Zulu (without CRaC) + id: download_zulu + shell: bash + run: | + cd $RUNNER_TEMP + jdk_archive_filename=$(curl -LOs -w '%{filename_effective}' "$(curl -s -X GET 'https://api.azul.com/metadata/v1/zulu/packages/?os=windows&arch=x64&archive_type=zip&java_package_type=jdk&javafx_bundled=false&crac_supported=false&release_status=ga&availability_types=CA&certifications=tck' --data-urlencode "java_version=$JAVA_VERSION" -H 'accept: application/json' | jq -r '.[0].download_url')") + echo "jdk_archive_filename=$jdk_archive_filename" >> $GITHUB_OUTPUT - name: Install JDK uses: actions/setup-java@v4 with: - distribution: ${{ env.JAVA_DISTRIBUTION }} + distribution: jdkfile + jdkFile: ${{ runner.temp }}/${{ steps.download_zulu.outputs.jdk_archive_filename }} java-version: ${{ env.JAVA_VERSION }} - name: Build run: ./gradlew distZip --info @@ -68,10 +75,18 @@ jobs: fetch-depth: 0 persist-credentials: false submodules: true + - name: Download Zulu (without CRaC) + id: download_zulu + shell: bash + run: | + cd $RUNNER_TEMP + jdk_archive_filename=test=$(curl -LOs -w '%{filename_effective}' "$(curl -s -X GET 'https://api.azul.com/metadata/v1/zulu/packages/?os=linux&arch=x64&archive_type=tar.gz&java_package_type=jdk&javafx_bundled=false&crac_supported=false&release_status=ga&availability_types=CA&certifications=tck' --data-urlencode "java_version=$JAVA_VERSION" -H 'accept: application/json' | jq -r '.[0].download_url')") + echo "jdk_archive_filename=$jdk_archive_filename" >> $GITHUB_OUTPUT - name: Install JDK uses: actions/setup-java@v4 with: - distribution: ${{ env.JAVA_DISTRIBUTION }} + distribution: jdkfile + jdkFile: ${{ runner.temp }}/${{ steps.download_zulu.outputs.jdk_archive_filename }} java-version: ${{ env.JAVA_VERSION }} - name: Build run: ./gradlew distTar --info