Skip to content

Commit ac352d4

Browse files
authored
Update and rename build_and_test to build_test_publish
1 parent 404af54 commit ac352d4

File tree

2 files changed

+38
-23
lines changed

2 files changed

+38
-23
lines changed

.github/workflows/build_and_test

Lines changed: 0 additions & 23 deletions
This file was deleted.
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
2+
name: Maven CI/CD
3+
4+
on:
5+
push:
6+
branches: [ master ]
7+
pull_request:
8+
branches: [ master ]
9+
10+
jobs:
11+
build_and_test:
12+
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: Set up JDK 14
18+
uses: actions/setup-java@v1
19+
with:
20+
java-version: 14
21+
22+
- name: Build project with Maven
23+
run: mvn -B package --file pom.xml
24+
25+
publish-job:
26+
runs-on: ubuntu-latest
27+
needs: [build_and_test]
28+
steps:
29+
- uses: actions/checkout@v2
30+
- uses: actions/setup-java@v1
31+
with:
32+
java-version: 14
33+
- run: mvn -B package --file pom.xml -DskipTests
34+
- run: mkdir staging && cp target/*jar-with-dependencies.jar staging
35+
- uses: actions/upload-artifact@v1
36+
with:
37+
name: Package
38+
path: staging

0 commit comments

Comments
 (0)