Skip to content

Commit 3f2f7ad

Browse files
committed
Publish jar to GitHub artifact storage
1 parent 9fa1009 commit 3f2f7ad

1 file changed

Lines changed: 13 additions & 4 deletions

File tree

.github/workflows/maven.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,29 +6,38 @@
66
# separate terms of service, privacy policy, and support
77
# documentation.
88

9-
name: Java CI with Maven
9+
name: Build And Publish JAR Artifact
1010

1111
on:
1212
push:
1313
branches: [ "main" ]
1414
pull_request:
1515
branches: [ "main" ]
16+
workflow_dispatch:
1617

1718
jobs:
1819
build:
19-
2020
runs-on: ubuntu-latest
2121

2222
steps:
23-
- uses: actions/checkout@v3
23+
- uses: actions/checkout@v4
2424
- name: Set up JDK 21
25-
uses: actions/setup-java@v3
25+
uses: actions/setup-java@v4
2626
with:
2727
java-version: '21'
2828
distribution: 'temurin'
2929
cache: maven
3030
- name: Build with Maven
3131
run: mvn -B package --file pom.xml
32+
- name: Upload JAR artifact
33+
uses: actions/upload-artifact@v4
34+
with:
35+
name: maf-jar-${{ github.sha }}
36+
path: |
37+
target/*.jar
38+
!target/*-sources.jar
39+
!target/*-javadoc.jar
40+
if-no-files-found: error
3241

3342
# Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive
3443
- name: Update dependency graph

0 commit comments

Comments
 (0)