Skip to content

Commit

Permalink
Add gpg plugin and release pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
qtc-de committed Dec 22, 2023
1 parent 06485ea commit 02041a3
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: publish

on:
release:
types:
- created

jobs:
publish:

runs-on: ubuntu-latest

steps:
- name: ${{ github.event.repository.name }}
uses: actions/checkout@v4

- name: Set up Maven Central Repository
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'temurin'
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.gpg_key }}
gpg-passphrase: ${{ secrets.gpg_pass }}

- name: Publish package
run: mvn --batch-mode clean deploy
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
21 changes: 21 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,27 @@
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.1.0</version>
<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>
</project>

0 comments on commit 02041a3

Please sign in to comment.