Skip to content

Commit b9b8e9d

Browse files
committed
Create maven-publish.yml
1 parent bc96b06 commit b9b8e9d

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
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+
create:
8+
branches:
9+
- tag/*
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
permissions:
15+
contents: read
16+
packages: write
17+
18+
steps:
19+
- uses: actions/checkout@v3
20+
- name: Set up JDK 8
21+
uses: actions/setup-java@v3
22+
with:
23+
java-version: '1.8'
24+
distribution: 'temurin'
25+
server-id: ossrh # Value of the distributionManagement/repository/id field of the pom.xml
26+
settings-path: ${{ github.workspace }} # location for the settings.xml file
27+
28+
- name: Build with Maven
29+
run: mvn -B package -pl cache-as-multi
30+
31+
- name: Publish to GitHub Packages Apache Maven
32+
run: mvn deploy -s $GITHUB_WORKSPACE/settings.xml -pl cache-as-multi
33+
env:
34+
GITHUB_TOKEN: ${{ github.token }}

0 commit comments

Comments
 (0)