Skip to content

Commit

Permalink
Manually download Zulu without CRaC via new Azul API - workaround for a…
Browse files Browse the repository at this point in the history
  • Loading branch information
bwRavencl committed Aug 26, 2024
1 parent e036096 commit 62fbb41
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
- master

env:
JAVA_DISTRIBUTION: zulu
JAVA_VERSION: 22.0.2+9
GRADLE_OPTS: -Dorg.gradle.daemon=false

Expand All @@ -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
Expand Down Expand Up @@ -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=$(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
Expand Down

0 comments on commit 62fbb41

Please sign in to comment.