Skip to content

Commit 14ae5b4

Browse files
authored
Merge pull request #1 from allaboutapps/ek/maven-central-integration
Maven Central Integration
2 parents 231e72d + 0139a6e commit 14ae5b4

5 files changed

Lines changed: 495 additions & 100 deletions

File tree

Lines changed: 29 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,36 @@
1-
name: Publish package to the Maven Central Repository
1+
name: Publish to Maven Central
22
on:
33
release:
44
types: [created]
55
jobs:
66
publish:
7+
name: Publish to Maven Central
78
runs-on: ubuntu-latest
9+
810
steps:
9-
- uses: actions/checkout@v4
10-
- name: Set up Maven Central Repository
11-
uses: actions/setup-java@v4
12-
with:
13-
java-version: '17'
14-
distribution: 'temurin'
15-
server-id: ossrh
16-
server-username: MAVEN_USERNAME
17-
server-password: MAVEN_PASSWORD
18-
- name: Publish package
19-
run: mvn -B deploy --file pom.xml
20-
env:
21-
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
22-
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
11+
- name: Checkout code
12+
uses: actions/checkout@v4
13+
14+
- name: Set up JDK 17
15+
uses: actions/setup-java@v4
16+
with:
17+
java-version: '17'
18+
distribution: 'temurin'
19+
server-id: central
20+
server-username: MAVEN_USERNAME
21+
server-password: MAVEN_PASSWORD
22+
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
23+
gpg-passphrase: MAVEN_GPG_PASSPHRASE
24+
25+
- name: Verify GPG setup
26+
run: gpg --list-secret-keys --keyid-format LONG
27+
28+
- name: Publish to Maven Central
29+
run: |
30+
./mvnw deploy -B \
31+
-DskipTests
32+
env:
33+
# Maven Central credentials via https://central.sonatype.com/account
34+
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
35+
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
36+
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
wrapperVersion=3.3.2
18+
distributionType=only-script
19+
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.6/apache-maven-3.9.6-bin.zip

mvnw

Lines changed: 259 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)