Skip to content

Commit

Permalink
ci: Add gpg setup
Browse files Browse the repository at this point in the history
  • Loading branch information
fabriziodemaria committed Sep 21, 2023
1 parent 0350763 commit 5b1708f
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@ jobs:
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-passphrase: SIGN_KEY_PASSWORD
- name: Publish package
run: mvn --batch-mode deploy
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
SIGN_KEY_PASSWORD: ${{ secrets.SIGN_KEY_PASS }}
34 changes: 31 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,20 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<distributionManagement>
<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>ossrh</id>
<name>Central Repository OSSRH</name>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>

<groupId>com.spotify</groupId>
<artifactId>confidence-openfeature-provider</artifactId>
<version>0.1.0-SNAPSHOT</version>
<version>0.0.1-SNAPSHOT</version>

<!-- <url>TODO UPDATE THIS</url>-->
<description>Confidence OpenFeature provider for Java</description>
Expand Down Expand Up @@ -241,6 +244,31 @@
<artifactId>maven-source-plugin</artifactId>
<version>3.3.0</version>
</plugin>
<!-- <plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.7</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin> -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.5</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<reporting>
Expand Down

0 comments on commit 5b1708f

Please sign in to comment.