Skip to content

Commit 0913f2d

Browse files
Modify Maven publish workflow for push and PR events
Updated workflow to trigger on push and pull requests to master. Removed publishing step and added artifact upload step.
1 parent c986b9e commit 0913f2d

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created
2+
# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#apache-maven-with-a-settings-path
3+
4+
name: Maven Package
5+
6+
on:
7+
push:
8+
branches: [master]
9+
pull_request:
10+
branches: [master]
11+
12+
jobs:
13+
build:
14+
15+
runs-on: ubuntu-latest
16+
permissions:
17+
contents: read
18+
packages: write
19+
20+
steps:
21+
- uses: actions/checkout@v4
22+
- name: Set up JDK 11
23+
uses: actions/setup-java@v4
24+
with:
25+
java-version: '11'
26+
distribution: 'temurin'
27+
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
28+
settings-path: ${{ github.workspace }} # location for the settings.xml file
29+
30+
- name: Build with Maven
31+
run: mvn -B package --file pom.xml
32+
33+
- name: upload build artifact
34+
uses: actions/[email protected]
35+
with:
36+
name: address-war
37+

0 commit comments

Comments
 (0)