Skip to content

Commit

Permalink
feat: push to maven central
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholasM95 committed May 21, 2024
1 parent 12e506e commit 1401ee9
Show file tree
Hide file tree
Showing 2 changed files with 89 additions and 3 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Publish to the Maven Central Repository
run: ./mvnw --batch-mode deploy
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}

- name: Update CHANGELOG.md
if: github.ref == 'refs/heads/main'
run: |
Expand Down
86 changes: 83 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,95 @@
<feign.version>13.2.1</feign.version>
</properties>

<licenses>
<license>
<name>The Apache License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
</license>
</licenses>

<developers>
<developer>
<id>nicholasM95</id>
<name>Nicholas Meyers</name>
<email>nicholas.meyers@hotmail.com</email>
</developer>
</developers>

<scm>
<connection>scm:git:https://github.com/nicholasM95/vwgroup-connector.git</connection>
<url>https://github.com/nicholasM95/vwgroup-connector.git</url>
<developerConnection>scm:git:https://github.com/nicholasM95/vwgroup-connector.git</developerConnection>
<tag>HEAD</tag>
</scm>

<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>github</id>
<name>VW Group Connector</name>
<url>https://maven.pkg.github.com/nicholasM95/vwgroup-connector</url>
<id>ossrh</id>
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>

<profiles>
<profile>
<id>ci-cd</id>
<build>
<plugins>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.13</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://s01.oss.sonatype.org</nexusUrl>
<autoReleaseAfterClose>${env.AUTO_RELEASE_AFTER_CLOSE}</autoReleaseAfterClose>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.5.3</version>
<configuration>
<tagNameFormat>@{project.version}</tagNameFormat>
</configuration>
<executions>
<execution>
<id>default</id>
<goals>
<goal>perform</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
<configuration>
<gpgArguments>
<arg>--pinentry-mode</arg>
<arg>loopback</arg>
</gpgArguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>


<dependencies>
<dependency>
Expand Down

0 comments on commit 1401ee9

Please sign in to comment.