Skip to content

Commit 171f603

Browse files
author
McCabe Coats
committed
Update publish workflow
Updating the publish workflow to include `gpg` authentication when publishing to Maven.
1 parent a8272ee commit 171f603

6 files changed

Lines changed: 29 additions & 5 deletions

File tree

.github/workflows/publish.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,19 @@ jobs:
1515
server-id: ossrh
1616
server-username: MAVEN_USERNAME
1717
server-password: MAVEN_PASSWORD
18-
- name: Publish package
18+
19+
- name: Set up Apache Maven Central
20+
uses: actions/setup-java@v2
21+
with:
22+
distribution: 'temurin'
23+
java-version: '11'
24+
server-id: ossrh
25+
server-username: ${{ secrets.OSSRH_USERNAME }}
26+
server-password: ${{ secrets.OSSRH_TOKEN }}
27+
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
28+
gpg-passphrase: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
29+
30+
- name: Publish to Maven Central
1931
run: mvn --batch-mode deploy
2032
env:
2133
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ mvn clean package
2828
```
2929

3030
Then manually install the following JARs:
31-
- `target/mx-platform-java-0.2.1.jar`
31+
- `target/mx-platform-java-0.2.2.jar`
3232
- `target/lib/*.jar`
3333

3434
## Getting Started

openapi/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiPackage: "com.mx.client.mx-platform-api"
22
artifactDescription: "A Java library for the MX Platform API"
33
artifactId: "mx-platform-java"
44
artifactUrl: "https://github.com/mxenabled/mx-platform-java"
5-
artifactVersion: 0.2.1
5+
artifactVersion: 0.2.2
66
developerEmail: "devexperience@mx.com"
77
developerName: "MX"
88
developerOrganization: "MX Technologies Inc."

openapi/templates/pom.mustache

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,12 @@
221221
</goals>
222222
</execution>
223223
</executions>
224+
<configuration>
225+
<gpgArguments>
226+
<arg>--pinentry-mode</arg>
227+
<arg>loopback</arg>
228+
</gpgArguments>
229+
</configuration>
224230
</plugin>
225231
</plugins>
226232
</build>

pom.xml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<artifactId>mx-platform-java</artifactId>
66
<packaging>jar</packaging>
77
<name>mx-platform-java</name>
8-
<version>0.2.1</version>
8+
<version>0.2.2</version>
99
<url>https://github.com/mxenabled/mx-platform-java</url>
1010
<description>A Java library for the MX Platform API</description>
1111
<scm>
@@ -214,6 +214,12 @@
214214
</goals>
215215
</execution>
216216
</executions>
217+
<configuration>
218+
<gpgArguments>
219+
<arg>--pinentry-mode</arg>
220+
<arg>loopback</arg>
221+
</gpgArguments>
222+
</configuration>
217223
</plugin>
218224
</plugins>
219225
</build>

src/main/java/com/mx/client/ApiClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ private void init() {
125125
json = new JSON();
126126

127127
// Set default User-Agent.
128-
setUserAgent("OpenAPI-Generator/0.2.1/java");
128+
setUserAgent("OpenAPI-Generator/0.2.2/java");
129129

130130
authentications = new HashMap<String, Authentication>();
131131
}

0 commit comments

Comments
 (0)