Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@ jobs:
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"

- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.GPG_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
- name: List keys
run: gpg -K

- name: Setup SSH
uses: webfactory/ssh-agent@v0.9.0
with:
Expand Down
132 changes: 130 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,26 @@
<artifactId>oras-java-sdk</artifactId>
<version>0.1.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>ORAS Java SDK</name>
<name>${project.groupId}:${project.artifactId}</name>
<description>ORAS Java SDK</description>
<url>https://github.com/oras-project/oras-java</url>

<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>
<name>Valentin Delaye</name>
<email>jonesbusy@jonesbusy.com</email>
<organization>ORAS</organization>
<organizationUrl>https://oras.land/</organizationUrl>
</developer>
</developers>

<scm>
<connection>scm:git:git@github.com:oras-project/oras-java.git</connection>
<developerConnection>scm:git:git@github.com:oras-project/oras-java.git</developerConnection>
Expand Down Expand Up @@ -52,7 +69,10 @@
<spotless-maven-plugin.version>2.44.2</spotless-maven-plugin.version>
<maven-enforcer-plugin.version>3.5.0</maven-enforcer-plugin.version>
<maven-javadoc-plugin.version>3.11.2</maven-javadoc-plugin.version>
<maven-source-plugin.version>3.3.1</maven-source-plugin.version>
<maven-release-plugin.version>3.1.1</maven-release-plugin.version>
<maven-gpg-plugin.version>3.2.7</maven-gpg-plugin.version>
<central-publishing-maven-plugin.version>0.7.0</central-publishing-maven-plugin.version>

<!-- Target Java 17 -->
<maven.compiler.source>17</maven.compiler.source>
Expand Down Expand Up @@ -197,6 +217,20 @@
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>${maven-gpg-plugin.version}</version>
<executions>
<execution>
<id>sign-artifacts</id>
<goals>
<goal>sign</goal>
</goals>
<phase>verify</phase>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
Expand All @@ -216,13 +250,40 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
<version>${central-publishing-maven-plugin.version}</version>
<extensions>true</extensions>
<configuration>
<publishingServerId>central</publishingServerId>
<autoPublish>true</autoPublish>
<waitUntil>published</waitUntil>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>${maven-source-plugin.version}</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
<phase>verify</phase>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>${maven-release-plugin.version}</version>
<configuration>
<tagNameFormat>@{project.version}</tagNameFormat>
<scmCommentPrefix>[ci skip]</scmCommentPrefix>
<!-- Enable release profile when ready for central -->
<!-- <releaseProfiles>release</releaseProfiles> -->
</configuration>
</plugin>
<plugin>
Expand All @@ -239,7 +300,7 @@
<configuration>
<rules>
<requireMavenVersion>
<version>[3.9.8,)</version>
<version>[3.9.9,)</version>
</requireMavenVersion>
<requireJavaVersion>
<version>[${maven.compiler.release},)</version>
Expand Down Expand Up @@ -323,8 +384,75 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
</plugin>
</plugins>

</build>

<profiles>
<profile>
<id>release</id>
<properties>
<skipTests>true</skipTests>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>sign-only</id>
<properties>
<skipTests>true</skipTests>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
</plugin>
</plugins>
</build>
</profile>
</profiles>

</project>