You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+26-17Lines changed: 26 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,11 +18,20 @@ The `setup-java` action provides the following functionality for GitHub Actions
18
18
19
19
This action allows you to work with Java and Scala projects.
20
20
21
+
## Breaking changes in V5
22
+
23
+
- Upgraded action from node20 to node24
24
+
> Make sure your runner is on version v2.327.1 or later to ensure compatibility with this release [Release Notes](https://github.com/actions/runner/releases/tag/v2.327.1)
25
+
26
+
For more details, see the full release notes on the [releases page](https://github.com/actions/setup-java/releases/tag/v5.0.0)
27
+
21
28
## V2 vs V1
22
29
23
30
- V2 supports custom distributions and provides support for Azul Zulu OpenJDK, Eclipse Temurin and AdoptOpenJDK out of the box. V1 supports only Azul Zulu OpenJDK.
24
31
- V2 requires you to specify distribution along with the version. V1 defaults to Azul Zulu OpenJDK, only version input is required. Follow [the migration guide](docs/switching-to-v2.md) to switch from V1 to V2.
25
32
33
+
For information about the latest releases, recent updates, and newly supported distributions, please refer to the `setup-java`[Releases](https://github.com/actions/setup-java/releases).
34
+
26
35
## Usage
27
36
28
37
-`java-version`: The Java version that is going to be set up. Takes a whole or [semver](#supported-version-syntax) Java version. If not specified, the action will expect `java-version-file` input to be specified.
@@ -69,8 +78,8 @@ This action allows you to work with Java and Scala projects.
69
78
#### Eclipse Temurin
70
79
```yaml
71
80
steps:
72
-
- uses: actions/checkout@v4
73
-
- uses: actions/setup-java@v4
81
+
- uses: actions/checkout@v5
82
+
- uses: actions/setup-java@v5
74
83
with:
75
84
distribution: 'temurin'# See 'Supported distributions' for available options
76
85
java-version: '21'
@@ -80,8 +89,8 @@ steps:
80
89
#### Azul Zulu OpenJDK
81
90
```yaml
82
91
steps:
83
-
- uses: actions/checkout@v4
84
-
- uses: actions/setup-java@v4
92
+
- uses: actions/checkout@v5
93
+
- uses: actions/setup-java@v5
85
94
with:
86
95
distribution: 'zulu'# See 'Supported distributions' for available options
87
96
java-version: '21'
@@ -136,8 +145,8 @@ The cache input is optional, and caching is turned off by default.
136
145
#### Caching gradle dependencies
137
146
```yaml
138
147
steps:
139
-
- uses: actions/checkout@v4
140
-
- uses: actions/setup-java@v4
148
+
- uses: actions/checkout@v5
149
+
- uses: actions/setup-java@v5
141
150
with:
142
151
distribution: 'temurin'
143
152
java-version: '21'
@@ -151,8 +160,8 @@ steps:
151
160
#### Caching maven dependencies
152
161
```yaml
153
162
steps:
154
-
- uses: actions/checkout@v4
155
-
- uses: actions/setup-java@v4
163
+
- uses: actions/checkout@v5
164
+
- uses: actions/setup-java@v5
156
165
with:
157
166
distribution: 'temurin'
158
167
java-version: '21'
@@ -165,8 +174,8 @@ steps:
165
174
#### Caching sbt dependencies
166
175
```yaml
167
176
steps:
168
-
- uses: actions/checkout@v4
169
-
- uses: actions/setup-java@v4
177
+
- uses: actions/checkout@v5
178
+
- uses: actions/setup-java@v5
170
179
with:
171
180
distribution: 'temurin'
172
181
java-version: '21'
@@ -185,8 +194,8 @@ Usually, cache gets downloaded in multiple segments of fixed sizes. Sometimes, a
185
194
env:
186
195
SEGMENT_DOWNLOAD_TIMEOUT_MINS: '5'
187
196
steps:
188
-
- uses: actions/checkout@v4
189
-
- uses: actions/setup-java@v4
197
+
- uses: actions/checkout@v5
198
+
- uses: actions/setup-java@v5
190
199
with:
191
200
distribution: 'temurin'
192
201
java-version: '21'
@@ -205,8 +214,8 @@ For Java distributions that are not cached on Hosted images, `check-latest` alwa
205
214
206
215
```yaml
207
216
steps:
208
-
- uses: actions/checkout@v4
209
-
- uses: actions/setup-java@v4
217
+
- uses: actions/checkout@v5
218
+
- uses: actions/setup-java@v5
210
219
with:
211
220
distribution: 'temurin'
212
221
java-version: '21'
@@ -224,9 +233,9 @@ jobs:
224
233
java: [ '8', '11', '17', '21' ]
225
234
name: Java ${{ matrix.Java }} sample
226
235
steps:
227
-
- uses: actions/checkout@v4
236
+
- uses: actions/checkout@v5
228
237
- name: Setup java
229
-
uses: actions/setup-java@v4
238
+
uses: actions/setup-java@v5
230
239
with:
231
240
distribution: '<distribution>'
232
241
java-version: ${{ matrix.java }}
@@ -239,7 +248,7 @@ All versions are added to the PATH. The last version will be used and available
0 commit comments