-
Notifications
You must be signed in to change notification settings - Fork 4
/
action.yml
36 lines (36 loc) · 1.01 KB
/
action.yml
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
name: 'Build'
description: 'Build a Java project using Maven'
inputs:
java_version:
description: 'The Java version'
required: false
default: '17'
build_command:
description: 'The command to build the Java project'
required: false
default: 'mvn package -Pprod,azure'
package_path:
description: 'The path to the generated package, to be uploaded on the last step'
required: false
default: '${{ github.workspace }}/target/*.[j,w]ar'
runs:
using: "composite"
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: ${{ inputs.java_version }}
check-latest: false
cache: 'maven'
- name: Build with Maven
run: ${{ inputs.build_command }}
shell: bash
- name: Temporarily save package
uses: actions/upload-artifact@v3
with:
name: package
path: ${{ inputs.package_path }}
retention-days: 1