Skip to content

Commit

Permalink
Ossrh profile should be explicitly enabled
Browse files Browse the repository at this point in the history
Fixes GPG issue building #31

Signed-off-by: Cédric Couralet <[email protected]>
  • Loading branch information
micedre committed Aug 2, 2021
1 parent 3adc657 commit db63bcb
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 50 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/deploy-maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ jobs:
- id: install-secret-key
name: Install gpg secret key
run: |
cat <(echo -e "${{ secrets.OSSRH_GPG_KEY }}") | gpg --batch --import
gpg --list-secret-keys --keyid-format LONG
cat <(echo -e "${{ secrets.OSSRH_GPG_KEY }}") | gpg --batch --import
gpg --list-secret-keys --keyid-format LONG
- id: publish-to-central
name: Publish to Central Repository
env:
Expand All @@ -30,9 +30,10 @@ jobs:
--no-transfer-progress \
--batch-mode \
-Dgpg.passphrase=${{ secrets.OSSRH_GPG_KEY_PASSWORD }} \
-P ossrh \
clean deploy
- id: push-new-version
name: push new version
name: push new version
run: |
git clone https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{github.repository}}.git
cd keycloak-mail-whitelisting
Expand Down
94 changes: 47 additions & 47 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -97,56 +97,56 @@
</execution>
</executions>
</plugin>

</plugins>
</build>

<profiles>
<profile>
<id>ossrh</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<gpg.executable>gpg</gpg.executable>
<!-- <gpg.passphrase>${env.GPG_PASSWORD}</gpg.passphrase> -->
</properties>
<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<name>Central Repository OSSRH</name>
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<profile>
<id>ossrh</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<properties>
<gpg.executable>gpg</gpg.executable>
<!-- <gpg.passphrase>${env.GPG_PASSWORD}</gpg.passphrase> -->
</properties>
<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<name>Central Repository OSSRH</name>
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>ossrh</id>
<name>Central Repository OSSRH</name>
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.0.1</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
<configuration>
<gpgArguments>
<arg>--pinentry-mode</arg>
<arg>loopback</arg>
</gpgArguments>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<id>ossrh</id>
<name>Central Repository OSSRH</name>
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.0.1</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
<configuration>
<gpgArguments>
<arg>--pinentry-mode</arg>
<arg>loopback</arg>
</gpgArguments>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>

0 comments on commit db63bcb

Please sign in to comment.