Skip to content

Commit

Permalink
Prepare for automatic relase to Maven central
Browse files Browse the repository at this point in the history
  • Loading branch information
zapodot committed Jul 11, 2024
1 parent 373fbcc commit 0d45ab0
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/deploy-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Publish package to the Maven Central Repository
on:
release:
types: [created]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Java 11
uses: actions/setup-java@v4
with:
java-version: 11
distribution: 'temurin'
server-id: sonatype-nexus-staging
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.GPG_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: Publish to maven central
run: mvn -B -DskipTests=true --no-transfer-progress -Dgpg.passphrase=${{ secrets.GPG_KEY_PASSPHRASE }} -Prelease clean deploy
env:
MAVEN_USERNAME: ${{ secrets.SONATYPE_USER }}
MAVEN_PASSWORD: ${{ secrets.SONATYPE_PWD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_KEY_PASSPHRASE }}
6 changes: 6 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,12 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>${maven-gpg-plugin.version}</version>
<configuration>
<gpgArguments>
<arg>--pinentry-mode</arg>
<arg>loopback</arg>
</gpgArguments>
</configuration>
<executions>
<execution>
<id>sign-artifacts</id>
Expand Down

0 comments on commit 0d45ab0

Please sign in to comment.