Skip to content

Commit

Permalink
github action mvn deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
ezerozen committed Apr 30, 2024
1 parent 4856948 commit f79d977
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 2 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/maven-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Publish package to the Maven Central Repository

on:
release:
types: [published]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '11'
- name: Set up Apache Maven Central
uses: actions/setup-java@v4
with: # running setup-java again overwrites the settings.xml
distribution: 'temurin'
java-version: '11'
server-id: ossrh # Value of the distributionManagement/repository/id field of the pom.xml
server-username: MAVEN_USERNAME # env variable for username in deploy
server-password: MAVEN_CENTRAL_TOKEN # env variable for token in deploy
gpg-private-key: ${{ secrets.MAVEN_SIGNING_KEY }} # Value of the GPG private key to import
gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase

- name: Publish to Apache Maven Central
run: mvn clean deploy -Dmaven.test.skip
env:
MAVEN_USERNAME: ${{ secrets.MVN_CENTRAL_USERNAME}}
MAVEN_CENTRAL_TOKEN: ${{ secrets.MVN_CENTRAL_PASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_SIGNING_KEY_PASSPHRASE }}
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<artifactId>ct-conekta-java</artifactId>
<packaging>jar</packaging>
<name>ct-conekta-java</name>
<version>6.1.1</version>
<version>6.1.1-test</version>
<url>https://developers.conekta.com/</url>
<description>This is a java library that allows interaction with https://api.conekta.io API.</description>
<scm>
Expand Down Expand Up @@ -186,7 +186,7 @@
<goal>sign</goal>
</goals>
<configuration>
<keyname>0x5F8EB601</keyname>
<keyname>A26C6169</keyname>
<passphraseServerId />
</configuration>
</execution>
Expand Down

0 comments on commit f79d977

Please sign in to comment.