Skip to content

Commit 6126868

Browse files
Create maven-publish.yml
1 parent 5253ae3 commit 6126868

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
./mvnw.cmd clean install# 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+
5+
6+
# Skip tests, checkstyles, findbugs, etc for quick build
7+
8+
# Build a specific service module
9+
./mvnw clean install -pl :s3 -P quick --am
10+
11+
on:
12+
release:
13+
types: [created]
14+
15+
jobs:
16+
build:
17+
18+
runs-on: ubuntu-latest
19+
permissions:
20+
contents: read
21+
packages: write
22+
23+
steps:
24+
- uses: actions/checkout@v4
25+
- name: Set up JDK 11
26+
uses: actions/setup-java@v4
27+
with:
28+
java-version: '11'
29+
distribution: 'temurin'
30+
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
31+
settings-path: ${{ github.workspace }} # location for the settings.xml file
32+
33+
- name: Build with Maven
34+
run: mvn -B package --file pom.xml
35+
36+
- name: Publish to GitHub Packages Apache Maven
37+
run: mvn deploy -s $GITHUB_WORKSPACE/settings.xml
38+
env:
39+
GITHUB_TOKEN: ${{ github.token }}

0 commit comments

Comments
 (0)