Skip to content

Commit a57a608

Browse files
committed
Update the workflow file to run on all branches, all OSs, use JDK 21, run "check" instead of "build", and use gradle/actions of a the latest release version
1 parent 2f09b5b commit a57a608

File tree

1 file changed

+13
-26
lines changed

1 file changed

+13
-26
lines changed

.github/workflows/gradle.yml

Lines changed: 13 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -9,59 +9,46 @@ name: Java CI with Gradle
99

1010
on:
1111
push:
12-
branches: [ "main" ]
12+
branches: [ "*" ]
1313
pull_request:
14-
branches: [ "main" ]
14+
branches: [ "*" ]
1515

1616
jobs:
17-
build:
17+
check:
1818

19-
runs-on: ubuntu-latest
19+
runs-on: ubuntu-latest, macos-latest, windows-latest
2020
permissions:
2121
contents: read
2222

2323
steps:
2424
- uses: actions/checkout@v4
25-
- name: Set up JDK 17
25+
- name: Set up JDK 21
2626
uses: actions/setup-java@v4
2727
with:
28-
java-version: '17'
28+
java-version: '21'
2929
distribution: 'temurin'
3030

31-
# Configure Gradle for optimal use in GitHub Actions, including caching of downloaded dependencies.
32-
# See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md
3331
- name: Setup Gradle
34-
uses: gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0
32+
uses: gradle/actions/setup-gradle@v4
3533

36-
- name: Build with Gradle Wrapper
37-
run: ./gradlew build
38-
39-
# NOTE: The Gradle Wrapper is the default and recommended way to run Gradle (https://docs.gradle.org/current/userguide/gradle_wrapper.html).
40-
# If your project does not have the Gradle Wrapper configured, you can use the following configuration to run Gradle with a specified version.
41-
#
42-
# - name: Setup Gradle
43-
# uses: gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0
44-
# with:
45-
# gradle-version: '8.9'
46-
#
47-
# - name: Build with Gradle 8.9
48-
# run: gradle build
34+
- name: Check with Gradle Wrapper
35+
run: ./gradlew check
4936

5037
dependency-submission:
5138

52-
runs-on: ubuntu-latest
39+
runs-on: ubuntu-latest, macos-latest, windows-latest
5340
permissions:
5441
contents: write
5542

5643
steps:
5744
- uses: actions/checkout@v4
58-
- name: Set up JDK 17
45+
- name: Set up JDK 21
5946
uses: actions/setup-java@v4
6047
with:
61-
java-version: '17'
48+
java-version: '21'
6249
distribution: 'temurin'
6350

6451
# Generates and submits a dependency graph, enabling Dependabot Alerts for all project dependencies.
6552
# See: https://github.com/gradle/actions/blob/main/dependency-submission/README.md
6653
- name: Generate and submit dependency graph
67-
uses: gradle/actions/dependency-submission@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0
54+
uses: gradle/actions/dependency-submission@v4

0 commit comments

Comments
 (0)