1
- # This is a basic workflow to help you get started with Actions
1
+ # This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
2
+ # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven
2
3
3
- name : CI
4
+ # This workflow uses actions that are not certified by GitHub.
5
+ # They are provided by a third-party and are governed by
6
+ # separate terms of service, privacy policy, and support
7
+ # documentation.
8
+
9
+ name : Java CI with Maven
4
10
5
- # Controls when the action will run. Triggers the workflow on push or pull request
6
- # events but only for the master branch
7
11
on :
8
12
push :
9
- branches : [ master ]
13
+ branches : [ main ]
10
14
pull_request :
11
- branches : [ master ]
15
+ branches : [ main ]
12
16
13
- # A workflow run is made up of one or more jobs that can run sequentially or in parallel
14
17
jobs :
15
- # This workflow contains a single job called "build"
16
18
build :
17
- # The type of runner that the job will run on
19
+
18
20
runs-on : ubuntu-latest
19
21
20
- # Steps represent a sequence of tasks that will be executed as part of the job
21
22
steps :
22
- # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
23
- - uses : actions/checkout@v2
24
-
25
- # Runs a set of commands using the runners shell
26
- - name : Run maven script
27
- uses : guillonapa/action-maven-cli/jdk8@master
23
+ - uses : actions/checkout@v3
24
+ - name : Set up JDK 11
25
+ uses : actions/setup-java@v3
28
26
with :
29
- lifecycle : ' clean package test'
27
+ java-version : ' 11'
28
+ distribution : ' adopt'
29
+ cache : maven
30
+ - name : Build with Maven
31
+ run : mvn -B package --file pom.xml
32
+
33
+ # Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive
34
+ # - name: Update dependency graph
35
+ # uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6
0 commit comments