-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (36 loc) · 981 Bytes
/
java.yml
File metadata and controls
38 lines (36 loc) · 981 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# Name of the workflow
name: DevOps Lab - Java
# Specifies what triggers the workflow
on: [push]
# Jobs to run in the workflow
jobs:
# First job to run in the workflow
build:
# Define the type of machine for the job to run on
runs-on: ubuntu-latest
# Sequence of steps to run
steps:
# Checkout the repository
- name: Checkout
uses: actions/checkout@v4
# Setup environment
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
cache: maven
# Verify tools
- name: Verify Java version
run: java -version
- name: Verify Maven version
run: mvn -version
# TODO: Build application with Maven
- name: Build with Maven
run: mvn clean package
# Upload artifacts
- name: Archive
uses: actions/upload-artifact@v4
with:
name: JAR
path: target/*.jar