File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- # This workflow will build a Java project with Ant
2- # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-ant
3-
41name : Java CI
52
63on :
74 push :
8- branches : [ "main" ]
95 pull_request :
10- branches : [ "main" ]
6+ workflow_dispatch :
117
128jobs :
139 build :
14-
1510 runs-on : ubuntu-latest
1611
1712 steps :
18- - uses : actions/checkout@v4
19- - name : Set up JDK 11
20- uses : actions/setup-java@v4
21- with :
22- java-version : ' 11'
23- distribution : ' temurin'
24- - name : Build with Ant
25- run : ant -noinput -buildfile build.xml
13+ - name : Checkout repository
14+ uses : actions/checkout@v4
15+
16+ - name : Set up Java
17+ uses : actions/setup-java@v4
18+ with :
19+ distribution : " temurin"
20+ java-version : " 17"
21+
22+ - name : Compile Java file
23+ run : javac Lib.java
24+
25+ - name : Run Java program
26+ run : echo "6" | java Lib
You can’t perform that action at this time.
0 commit comments