Skip to content

Commit 0cdb5b5

Browse files
committed
feat: adds workflow for building and uploading the artifact
1 parent 15a4ab4 commit 0cdb5b5

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

.github/workflows/artifact.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: artifact
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: checkout code
12+
uses: actions/checkout@v3
13+
14+
- name: setup java
15+
uses: actions/setup-java@v3
16+
with:
17+
distribution: 'temurin'
18+
java-version: '17'
19+
20+
- name: cache maven dependencies
21+
uses: actions/cache@v3
22+
with:
23+
path: ~/.m2/repository
24+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
25+
restore-keys: |
26+
${{ runner.os }}-maven
27+
28+
- name: build JAR
29+
run: mvn clean package -DskipTests
30+
31+
- name: upload maven artifact
32+
uses: actions/upload-artifact@v4
33+
with:
34+
name: API-Catalogo
35+
path: target/*.jar

0 commit comments

Comments
 (0)