1515 matrix :
1616 # Use these Java versions
1717 java : [
18- 17 , # Current Java LTS & minimum supported by Minecraft
18+ 21 , # Current Java LTS & minimum supported by Minecraft
1919 ]
2020 # and run on both Linux and Windows
2121 # os: [ubuntu-20.04, windows-2022]
2929 uses : actions/checkout@v3
3030
3131 - name : Setup JDK ${{ matrix.java }}
32- uses : actions/setup-java@v3
32+ uses : actions/setup-java@v4
3333 with :
3434 distribution : temurin
3535 java-version : ${{ matrix.java }}
@@ -131,7 +131,7 @@ jobs:
131131 # ## Upload .jar artifacts ###
132132
133133 - name : Upload CommandAPI (Bukkit) plugin artifact
134- if : ${{ runner.os == 'Linux' && matrix.java == '17 ' }} # Only upload artifacts built from latest java on one OS
134+ if : ${{ runner.os == 'Linux' && matrix.java == '21 ' }} # Only upload artifacts built from latest java on one OS
135135 uses : actions/upload-artifact@v3
136136 with :
137137 name : CommandAPI (Bukkit plugin)
@@ -141,7 +141,7 @@ jobs:
141141 !commandapi-platforms/commandapi-bukkit/commandapi-bukkit-plugin/target/*javadoc.jar
142142
143143 - name : Upload CommandAPI (Velocity) plugin artifact
144- if : ${{ runner.os == 'Linux' && matrix.java == '17 ' }} # Only upload artifacts built from latest java on one OS
144+ if : ${{ runner.os == 'Linux' && matrix.java == '21 ' }} # Only upload artifacts built from latest java on one OS
145145 uses : actions/upload-artifact@v3
146146 with :
147147 name : CommandAPI (Velocity plugin)
@@ -157,10 +157,10 @@ jobs:
157157
158158 # ## Save PR information for 'SonarAnalyze'
159159 - name : Save PR number to file
160- if : github.event_name == 'pull_request' && ${{ matrix.os }} == 'ubuntu-latest' && ${{ matrix.java_version }} == '17 '
160+ if : github.event_name == 'pull_request' && ${{ matrix.os }} == 'ubuntu-latest' && ${{ matrix.java_version }} == '21 '
161161 run : echo ${{ github.event.number }} > PR_NUMBER.txt
162162 - name : Archive PR number
163- if : github.event_name == 'pull_request' && ${{ matrix.os }} == 'ubuntu-latest' && ${{ matrix.java_version }} == '17 '
163+ if : github.event_name == 'pull_request' && ${{ matrix.os }} == 'ubuntu-latest' && ${{ matrix.java_version }} == '21 '
164164 uses : actions/upload-artifact@v3
165165 with :
166166 name : PR_NUMBER
@@ -175,14 +175,14 @@ jobs:
175175 - name : Checkout the CommandAPI repository
176176 uses : actions/checkout@v3
177177
178- - name : Setup JDK 17
179- uses : actions/setup-java@v3
178+ - name : Setup JDK 21
179+ uses : actions/setup-java@v4
180180 with :
181181 distribution : temurin
182182 server-id : ossrh # Needs to match the id in the main pom.xml file
183183 server-username : MAVEN_USERNAME
184184 server-password : MAVEN_PASSWORD
185- java-version : 17
185+ java-version : 21
186186 cache : maven
187187
188188 - name : Deploy snapshot version of the CommandAPI (Bukkit+Velocity) to the Sonatype snapshot repository
0 commit comments