Skip to content

Commit

Permalink
ci: add release profile
Browse files Browse the repository at this point in the history
work on #4
  • Loading branch information
bsorrentino committed Aug 2, 2024
1 parent e5ef005 commit 47cb279
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 41 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OSS_SONATYPE_TOKEN: ${{ secrets.OSS_SONATYPE_TOKEN }}
run: mvn -B source:jar javadoc:jar deploy --file pom.xml -s settings-template.xml -Dgpg.passphrase=${{ secrets.GPG_PASSPHRASE }}
run: mvn -B -Prelease source:jar javadoc:jar deploy --file pom.xml -s settings-template.xml -Dgpg.passphrase=${{ secrets.GPG_PASSPHRASE }}
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
Expand All @@ -39,4 +39,4 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OSS_SONATYPE_TOKEN: ${{ secrets.OSS_SONATYPE_TOKEN }}
run: mvn -pl server-jetty -B source:jar javadoc:jar deploy --file pom.xml -s settings-template.xml -Dgpg.passphrase=${{ secrets.GPG_PASSPHRASE }}
run: mvn -B -Prelease -pl server-jetty source:jar javadoc:jar deploy --file pom.xml -s settings-template.xml -Dgpg.passphrase=${{ secrets.GPG_PASSPHRASE }}
89 changes: 50 additions & 39 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -136,50 +136,13 @@

</plugin>

<!--
====================================================================================
# https://github.com/keybase/keybase-issues/issues/2798
export GPG_TTY=$(tty)
mvn source:jar javadoc:jar deploy -Dgpg.passphrase=thephrase
====================================================================================
-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.2.4</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
<configuration>
<keyname>[email protected]</keyname>
<gpgArguments>
<arg>--pinentry-mode</arg>
<arg>loopback</arg>
</gpgArguments>
</configuration>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.7.0</version>
<extensions>true</extensions>
<configuration>
<serverId>sonatype-server</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>

</plugins>

</pluginManagement>

<plugins>
</plugins>
</build>


Expand Down Expand Up @@ -210,5 +173,53 @@
<build>
</build>
</profile>

<profile>
<id>release</id>
<build>
<plugins>
<!--
====================================================================================
# https://github.com/keybase/keybase-issues/issues/2798
export GPG_TTY=$(tty)
mvn -Prelease source:jar javadoc:jar deploy -Dgpg.passphrase=thephrase
====================================================================================
-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.2.4</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
<configuration>
<keyname>[email protected]</keyname>
<gpgArguments>
<arg>--pinentry-mode</arg>
<arg>loopback</arg>
</gpgArguments>
</configuration>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.7.0</version>
<extensions>true</extensions>
<configuration>
<serverId>sonatype-server</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
</plugins>
</build>
</profile>

</profiles>
</project>

0 comments on commit 47cb279

Please sign in to comment.