This commit is contained in:
parent
52802eedb8
commit
c03c73fa2e
35
.gitea/workflows/ci.yaml
Normal file
35
.gitea/workflows/ci.yaml
Normal file
@ -0,0 +1,35 @@
|
||||
name: Java CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: http://fly6516.synology.me:4000/Gitea_Action/checkout@v2
|
||||
|
||||
- name: Set up JDK 17
|
||||
uses: http://fly6516.synology.me:4000/Gitea_Action/setup-java@v2
|
||||
with:
|
||||
java-version: '17'
|
||||
distribution: 'temurin'
|
||||
|
||||
- name: Compile Java program
|
||||
run: javac HelloWorld.java -d ./build/classes
|
||||
|
||||
- name: List compiled files
|
||||
run: ls -la ./build/classes
|
||||
|
||||
- name: Upload artifact
|
||||
uses: http://fly6516.synology.me:4000/Gitea_Action/upload-artifact@v2
|
||||
with:
|
||||
name: java-classes
|
||||
path: ./build/classes
|
10
HelloWorld.java
Normal file
10
HelloWorld.java
Normal file
@ -0,0 +1,10 @@
|
||||
|
||||
public class HelloWorld {
|
||||
|
||||
public static void main(String[] args) {
|
||||
System.out.println("Hello World!");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user