generated from hms-networks/sc-java-maven-starter-project
-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (37 loc) · 1.09 KB
/
build-artifacts.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
37
38
39
40
41
42
43
44
# HMS Networks; Americas
# Artifact Build Action for Maven-based Ewon ETK Projects
# Version: 3.0.0
# Date: February 8, 2024
#
# This action is configured to automatically run when a push
# is made to the `main` branch.
name: Build Artifacts
on:
push:
branches:
- main
jobs:
build-artifacts:
runs-on: ubuntu-latest
steps:
- name: Checkout Project
uses: actions/checkout@v4
- name: Set Up JDK
uses: actions/setup-java@v4
with:
distribution: 'corretto'
java-version: 16
cache: 'maven'
- name: Compile Java Files With Maven
run: mvn package -f pom.xml
- name: Get Current Time for Artifact Identification (Ubuntu)
run: echo "CURRENT_TIME=$(date +%Y-%m-%d_%H-%M-%S)" >> $GITHUB_ENV
- name: Upload Maven Artifacts (Ubuntu)
uses: actions/upload-artifact@v3
with:
name: ${{ github.event.repository.name }}-ARTIFACTS-BUILD${{ env.CURRENT_TIME }}UTC
path: |
target/*.jar
target/*.zip
target/*.gz
target/*.bz2