Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: actions/setup-java
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v4.2.1
Choose a base ref
...
head repository: actions/setup-java
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v4.2.2
Choose a head ref
  • 4 commits
  • 12 files changed
  • 4 contributors

Commits on May 3, 2024

  1. Updated advanced-usage.md (#622)

    * Update advanced-usage.md
    
    * Update advanced-usage.md
    
    * Update advanced-usage.md
    
    * Update README.md
    
    * Update advanced-usage.md
    mahabaleshwars authored May 3, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    Okeanos Nikolas Grottendieck
    Copy the full SHA
    a1c6c9c View commit details

Commits on May 22, 2024

  1. Fix versions check failures (#634)

    * fix macos latest failures
    
    * fix failures
    HarithaVattikuti authored May 22, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    2e74cbc View commit details

Commits on Jun 27, 2024

  1. Bump undici from 5.28.3 to 5.28.4 (#616)

    * Bump undici from 5.28.3 to 5.28.4
    
    Bumps [undici](https://github.com/nodejs/undici) from 5.28.3 to 5.28.4.
    - [Release notes](https://github.com/nodejs/undici/releases)
    - [Commits](nodejs/undici@v5.28.3...v5.28.4)
    
    ---
    updated-dependencies:
    - dependency-name: undici
      dependency-type: indirect
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    * Bump undici from 5.28.3 to 5.28.4
    
    Bumps [undici](https://github.com/nodejs/undici) from 5.28.3 to 5.28.4.
    - [Release notes](https://github.com/nodejs/undici/releases)
    - [Commits](nodejs/undici@v5.28.3...v5.28.4)
    
    ---
    updated-dependencies:
    - dependency-name: undici
      dependency-type: indirect
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    * bump braces from 3.0.2 to 3.0.3
    
    * Added Semver link
    
    ---------
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: HarithaVattikuti <73516759+HarithaVattikuti@users.noreply.github.com>
    dependabot[bot] and HarithaVattikuti authored Jun 27, 2024
    Copy the full SHA
    fd08b9c View commit details

Commits on Aug 1, 2024

  1. Copy the full SHA
    6a0805f View commit details
26 changes: 13 additions & 13 deletions .github/workflows/e2e-cache.yml
Original file line number Diff line number Diff line change
@@ -21,7 +21,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
os: [macos-13, windows-latest, ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v4
@@ -46,7 +46,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
os: [macos-13, windows-latest, ubuntu-latest]
needs: gradle-save
steps:
- name: Checkout
@@ -70,7 +70,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
os: [macos-13, windows-latest, ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v4
@@ -93,7 +93,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
os: [macos-13, windows-latest, ubuntu-latest]
needs: maven-save
steps:
- name: Checkout
@@ -121,7 +121,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
os: [macos-13, windows-latest, ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v4
@@ -132,33 +132,35 @@ jobs:
distribution: 'adopt'
java-version: '11'
cache: sbt
- name: Setup SBT
if: matrix.os == 'macos-13'
run: |
echo ""Installing SBT...""
brew install sbt
- name: Create files to cache
run: sbt update

- name: Check files to cache on macos-latest
if: matrix.os == 'macos-latest'
if: matrix.os == 'macos-13'
run: |
if [ ! -d ~/Library/Caches/Coursier ]; then
echo "::error::The ~/Library/Caches/Coursier directory does not exist unexpectedly"
exit 1
fi
- name: Check files to cache on windows-latest
if: matrix.os == 'windows-latest'
run: |
if [ ! -d ~/AppData/Local/Coursier/Cache ]; then
echo "::error::The ~/AppData/Local/Coursier/Cache directory does not exist unexpectedly"
exit 1
fi
- name: Check files to cache on ubuntu-latest
if: matrix.os == 'ubuntu-latest'
run: |
if [ ! -d ~/.cache/coursier ]; then
echo "::error::The ~/.cache/coursier directory does not exist unexpectedly"
exit 1
fi
sbt-restore:
runs-on: ${{ matrix.os }}
defaults:
@@ -168,7 +170,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
os: [macos-13, windows-latest, ubuntu-latest]
needs: sbt-save
steps:
- name: Checkout
@@ -182,14 +184,13 @@ jobs:
cache: sbt

- name: Confirm that ~/Library/Caches/Coursier directory has been made
if: matrix.os == 'macos-latest'
if: matrix.os == 'macos-13'
run: |
if [ ! -d ~/Library/Caches/Coursier ]; then
echo "::error::The ~/Library/Caches/Coursier directory does not exist unexpectedly"
exit 1
fi
ls ~/Library/Caches/Coursier
- name: Confirm that ~/AppData/Local/Coursier/Cache directory has been made
if: matrix.os == 'windows-latest'
run: |
@@ -198,7 +199,6 @@ jobs:
exit 1
fi
ls ~/AppData/Local/Coursier/Cache
- name: Confirm that ~/.cache/coursier directory has been made
if: matrix.os == 'ubuntu-latest'
run: |
38 changes: 19 additions & 19 deletions .github/workflows/e2e-versions.yml
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
os: [macos-13, windows-latest, ubuntu-latest]
distribution: [
'temurin',
'adopt',
@@ -32,15 +32,15 @@ jobs:
'corretto',
'dragonwell'
] # internally 'adopt-hotspot' is the same as 'adopt'
version: ['8', '11', '17']
version: ['21', '11', '17']
exclude:
- distribution: microsoft
version: 8
- distribution: dragonwell
os: macos-latest
os: macos-13
include:
- distribution: oracle
os: macos-latest
os: macos-13
version: 17
- distribution: oracle
os: windows-latest
@@ -73,7 +73,7 @@ jobs:
distribution: ['temurin', 'zulu', 'liberica']
version:
- '11.0'
- '8.0.302'
- '21.0'
- '17.0.7+7'
include:
- distribution: oracle
@@ -171,7 +171,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
os: [macos-13, windows-latest, ubuntu-latest]
version: ['17-ea', '15.0.0-ea.14']
steps:
- name: Checkout
@@ -215,22 +215,22 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
os: [macos-13, windows-latest, ubuntu-latest]
distribution: ['temurin', 'zulu', 'liberica', 'semeru']
java-package: ['jre']
version: ['17.0']
include:
- distribution: 'zulu'
java-package: jre+fx
version: '8'
version: '21'
os: ubuntu-latest
- distribution: 'zulu'
java-package: jdk+fx
version: '8.0.242'
version: '21.0'
os: ubuntu-latest
- distribution: 'liberica'
java-package: jdk+fx
version: '8'
version: '21'
os: ubuntu-latest
- distribution: 'liberica'
java-package: jre+fx
@@ -294,10 +294,10 @@ jobs:
uses: actions/checkout@v4
- name: Create .java-version file
shell: bash
run: echo "8" > .java-version
run: echo "17" > .java-version
- name: Create .tool-versions file
shell: bash
run: echo "java 8" > .tool-versions
run: echo "java 17" > .tool-versions
- name: setup-java
uses: ./
id: setup-java
@@ -351,22 +351,22 @@ jobs:
uses: actions/checkout@v4
- name: Create .java-version file
shell: bash
run: echo "11.0.2" > .java-version
run: echo "17.0.10" > .java-version
- name: Create .tool-versions file
shell: bash
run: echo "java 11.0.2" > .tool-versions
run: echo "java 17.0.10" > .tool-versions
- name: setup-java
uses: ./
id: setup-java
with:
distribution: ${{ matrix.distribution }}
java-version-file: ${{matrix.java-version-file }}
- name: Verify Java
run: bash __tests__/verify-java.sh "11.0.2" "${{ steps.setup-java.outputs.path }}"
run: bash __tests__/verify-java.sh "17.0.10" "${{ steps.setup-java.outputs.path }}"
shell: bash

setup-java-version-from-file-major-minor-patch-with-dist:
name: ${{ matrix.distribution }} version from file 'openjdk64-11.0.2' - ${{ matrix.os }}
name: ${{ matrix.distribution }} version from file 'openjdk64-17.0.10' - ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
@@ -379,16 +379,16 @@ jobs:
uses: actions/checkout@v4
- name: Create .java-version file
shell: bash
run: echo "openjdk64-11.0.2" > .java-version
run: echo "openjdk64-17.0.10" > .java-version
- name: Create .tool-versions file
shell: bash
run: echo "java openjdk64-11.0.2" > .tool-versions
run: echo "java openjdk64-17.0.10" > .tool-versions
- name: setup-java
uses: ./
id: setup-java
with:
distribution: ${{ matrix.distribution }}
java-version-file: ${{matrix.java-version-file }}
- name: Verify Java
run: bash __tests__/verify-java.sh "11.0.2" "${{ steps.setup-java.outputs.path }}"
run: bash __tests__/verify-java.sh "17.0.10" "${{ steps.setup-java.outputs.path }}"
shell: bash
2 changes: 1 addition & 1 deletion .licenses/npm/undici.dep.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -91,8 +91,8 @@ steps:
#### Supported version syntax
The `java-version` input supports an exact version or a version range using [SemVer](https://semver.org/) notation:
- major versions: `8`, `11`, `16`, `17`, `21`
- more specific versions: `17.0`, `11.0`, `11.0.4`, `8.0.232`, `8.0.282+8`
- early access (EA) versions: `15-ea`, `15.0.0-ea`, `15.0.0-ea.2`, `15.0.0+2-ea`
- more specific versions: `8.0.282+8`, `8.0.232`, `11.0`, `11.0.4`, `17.0`
- early access (EA) versions: `15-ea`, `15.0.0-ea`

#### Supported distributions
Currently, the following distributions are supported:
Loading