-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds maven central publishing parts (#37)
- Loading branch information
1 parent
da31cd9
commit 0b8dc5d
Showing
3 changed files
with
176 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: Upload Release | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
upload: | ||
name: Upload | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Cache Local Maven Repository | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.m2/repository | ||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | ||
|
||
- name: Setup Signing | ||
uses: actions/setup-java@v2 | ||
with: | ||
java-version: 11 | ||
distribution: 'adopt' | ||
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} | ||
gpg-passphrase: MAVEN_GPG_PASSPHRASE | ||
|
||
- name: Setup Maven Central | ||
uses: actions/setup-java@v2 | ||
with: | ||
java-version: 11 | ||
distribution: 'adopt' | ||
|
||
server-id: central-sonatype-org | ||
server-username: CENTRAL_SONATYPE_ORG_USERNAME | ||
server-password: CENTRAL_SONATYPE_ORG_PASSWORD | ||
gpg-passphrase: MAVEN_GPG_PASSPHRASE | ||
|
||
- name: Publish to Maven Central | ||
run: mvn --batch-mode -Drevision=${{ github.event.release.tag_name }} -Dsha1= -Dchangelist= clean deploy -Ppublish-maven-central | ||
env: | ||
CENTRAL_SONATYPE_ORG_USERNAME: ${{ secrets.CENTRAL_SONATYPE_ORG_USERNAME }} | ||
CENTRAL_SONATYPE_ORG_PASSWORD: ${{ secrets.CENTRAL_SONATYPE_ORG_PASSWORD }} | ||
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,3 +34,5 @@ hs_err_pid* | |
|
||
# macOS | ||
.DS_Store | ||
|
||
.flattened-pom.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,31 @@ | |
<name>aer_02</name> | ||
<description>Azure EventHub to syslog bridge using Azure Java Function</description> | ||
<url>https://teragrep.com</url> | ||
<licenses> | ||
<license> | ||
<name>GNU Affero General Public License v3.0</name> | ||
<url>https://github.com/teragrep/teragrep/blob/main/LICENSE</url> | ||
</license> | ||
</licenses> | ||
<developers> | ||
<developer> | ||
<name>Mikko Kortelainen</name> | ||
<email>[email protected]</email> | ||
<organization>Teragrep</organization> | ||
<organizationUrl>https://teragrep.com</organizationUrl> | ||
</developer> | ||
<developer> | ||
<name>43</name> | ||
<email>[email protected]</email> | ||
<organization>Teragrep</organization> | ||
<organizationUrl>https://teragrep.com</organizationUrl> | ||
</developer> | ||
</developers> | ||
<scm> | ||
<connection>scm:git:https://github.com/teragrep/aer_02.git</connection> | ||
<developerConnection>scm:git:[email protected]:teragrep/aer_02.git</developerConnection> | ||
<url>https://github.com/teragrep/aer_02/tree/master</url> | ||
</scm> | ||
<properties> | ||
<changelist>-SNAPSHOT</changelist> | ||
<functionAppName>aer_02-20241015142323079</functionAppName> | ||
|
@@ -605,9 +630,113 @@ | |
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-source-plugin</artifactId> | ||
<version>3.3.0</version> | ||
<executions> | ||
<execution> | ||
<id>attach-sources</id> | ||
<goals> | ||
<goal>jar-no-fork</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-javadoc-plugin</artifactId> | ||
<version>3.5.0</version> | ||
<executions> | ||
<execution> | ||
<id>attach-javadocs</id> | ||
<goals> | ||
<goal>jar</goal> | ||
</goals> | ||
<configuration> | ||
<source>8</source> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.codehaus.mojo</groupId> | ||
<artifactId>flatten-maven-plugin</artifactId> | ||
<version>1.1.0</version> | ||
<configuration> | ||
<updatePomFile>true</updatePomFile> | ||
<flattenMode>bom</flattenMode> | ||
</configuration> | ||
<executions> | ||
<execution> | ||
<id>flatten.clean</id> | ||
<goals> | ||
<goal>clean</goal> | ||
</goals> | ||
<phase>clean</phase> | ||
</execution> | ||
<execution> | ||
<id>flatten</id> | ||
<goals> | ||
<goal>flatten</goal> | ||
</goals> | ||
<phase>process-resources</phase> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
<profiles> | ||
<profile> | ||
<id>publish-maven-central</id> | ||
<distributionManagement> | ||
<repository> | ||
<id>ossrh</id> | ||
<name>Central Repository OSSRH</name> | ||
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url> | ||
</repository> | ||
<snapshotRepository> | ||
<id>ossrh</id> | ||
<url>https://oss.sonatype.org/content/repositories/snapshots</url> | ||
</snapshotRepository> | ||
</distributionManagement> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.sonatype.central</groupId> | ||
<artifactId>central-publishing-maven-plugin</artifactId> | ||
<version>0.5.0</version> | ||
<extensions>true</extensions> | ||
<configuration> | ||
<publishingServerId>central-sonatype-org</publishingServerId> | ||
<tokenAuth>true</tokenAuth> | ||
<autoPublish>true</autoPublish> | ||
<waitUntil>validated</waitUntil> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-gpg-plugin</artifactId> | ||
<version>1.6</version> | ||
<executions> | ||
<execution> | ||
<id>sign-artifacts</id> | ||
<goals> | ||
<goal>sign</goal> | ||
</goals> | ||
<phase>verify</phase> | ||
<configuration> | ||
<gpgArguments> | ||
<arg>--pinentry-mode</arg> | ||
<arg>loopback</arg> | ||
</gpgArguments> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</profile> | ||
<profile> | ||
<id>publish-github-packages</id> | ||
<distributionManagement> | ||
|