Skip to content
This repository was archived by the owner on Feb 15, 2024. It is now read-only.

Commit 3485607

Browse files
authored
Merge pull request #49 from admin-shell-io/feature/deploy-to-sonatype
Finalizing the maven push workflow
2 parents 83554a2 + 8457fe3 commit 3485607

2 files changed

Lines changed: 35 additions & 5 deletions

File tree

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# This workflow will deploy the Serializers and the Validator to the sonatype
2+
# staging environment. This will NOT automatically publish the artifacts. An
3+
# authorized user must still manually close the staging repository first.
4+
5+
name: Generate and Deploy to Sonatype
6+
7+
on:
8+
push:
9+
branches: [ main ]
10+
11+
jobs:
12+
13+
deploy:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v2
17+
18+
- name: Set up JDK 1.8
19+
uses: actions/setup-java@v2
20+
with:
21+
java-version: 11
22+
distribution: 'adopt'
23+
server-id: ossrh
24+
server-username: OSSRH_USERNAME
25+
server-password: OSSRH_PASSWORD
26+
gpg-private-key: ${{ secrets.MYGPGKEY_SEC }}
27+
28+
- name: Publish to Apache Maven Central
29+
run: mvn -P MavenCentral license:format deploy
30+
env:
31+
OSSRH_USERNAME: sebbader
32+
OSSRH_PASSWORD: ${{ secrets.SEBBADER_OSSHR_PASSWORD }}
33+
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_KEY_PASSWORD }}
34+
GPG_PASSPHRASE: ${{ secrets.GPG_KEY_PASSWORD }}

pom.xml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -187,10 +187,6 @@
187187
<groupId>org.apache.maven.plugins</groupId>
188188
<artifactId>maven-gpg-plugin</artifactId>
189189
<version>${plugin.gpg.version}</version>
190-
<configuration>
191-
<keyname>${gpg.keyname}</keyname>
192-
<passphraseServerId>${gpg.keyname}</passphraseServerId>
193-
</configuration>
194190
<executions>
195191
<execution>
196192
<id>sign-artifacts</id>
@@ -203,7 +199,7 @@
203199
</plugin>
204200
</plugins>
205201
</build>
206-
202+
207203
<!-- Central Repository deployment configuration -->
208204
<distributionManagement>
209205
<snapshotRepository>

0 commit comments

Comments
 (0)