Skip to content
This repository was archived by the owner on Jan 18, 2024. It is now read-only.

Commit e10974c

Browse files
authored
Create checkBuild.yml
1 parent f06add1 commit e10974c

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed

.github/workflows/checkBuild.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Check Build
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches: [ develop ]
7+
paths-ignore:
8+
- '**.md'
9+
pull_request:
10+
branches: [ develop ]
11+
paths-ignore:
12+
- '**.md'
13+
14+
jobs:
15+
build:
16+
runs-on: ubuntu-latest
17+
18+
strategy:
19+
matrix:
20+
java: [8, 11, 17]
21+
java-package: [jdk]
22+
distribution: [temurin]
23+
24+
steps:
25+
- uses: actions/checkout@v2
26+
27+
- name: Set up JDK
28+
uses: actions/setup-java@v2
29+
with:
30+
distribution: ${{ matrix.distribution }}
31+
java-version: ${{ matrix.java }}
32+
java-package: ${{ matrix.java-package }}
33+
cache: 'maven'
34+
35+
- name: Build with Maven
36+
run: mvn -B clean verify
37+
38+
- name: Check for uncommited changes
39+
run: |
40+
if [[ "$(git status --porcelain)" != "" ]]; then
41+
echo ----------------------------------------
42+
echo git status
43+
echo ----------------------------------------
44+
git status
45+
echo ----------------------------------------
46+
echo git diff
47+
echo ----------------------------------------
48+
git diff
49+
echo ----------------------------------------
50+
echo Troubleshooting
51+
echo ----------------------------------------
52+
echo "::error::Unstaged changes detected. Locally try running: git clean -ffdx && mvn -B clean verify"
53+
exit 1
54+
fi
55+
56+
- uses: actions/upload-artifact@v2
57+
with:
58+
name: jars-java-${{ matrix.java }}
59+
path: target/*.jar

0 commit comments

Comments
 (0)