Skip to content
This repository was archived by the owner on Dec 28, 2025. It is now read-only.

Commit d9e1abe

Browse files
authored
release maven package by actions (#137)
1 parent ba79813 commit d9e1abe

File tree

2 files changed

+46
-0
lines changed

2 files changed

+46
-0
lines changed

.github/workflows/release.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: release maven package
2+
3+
on:
4+
release:
5+
types: [ published ]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-20.04
10+
steps:
11+
- name: Install JDK 8
12+
uses: actions/setup-java@v2
13+
with:
14+
java-version: '8'
15+
distribution: 'zulu'
16+
17+
- name: Cache Maven packages
18+
uses: actions/cache@v2
19+
with:
20+
path: ~/.m2
21+
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
22+
restore-keys: ${{ runner.os }}-m2
23+
24+
- name: Checkout
25+
uses: actions/checkout@v2
26+
with:
27+
fetch-depth: 2
28+
29+
- name: Release Maven package
30+
uses: samuelmeuli/action-maven-publish@v1
31+
with:
32+
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
33+
gpg_passphrase: ${{ secrets.GPG_PASSPHRASE }}
34+
nexus_username: ${{ secrets.NEXUS_USERNAME }}
35+
nexus_password: ${{ secrets.NEXUS_PASSWORD }}
36+
server_id: sonatype-nexus-staging
37+
maven_profiles: "release"
38+
maven_args: >
39+
-Dmaven.test.skip=true

pom.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,13 @@
194194
</goals>
195195
</execution>
196196
</executions>
197+
<configuration>
198+
<!-- Prevent `gpg` from using pinentry programs -->
199+
<gpgArguments>
200+
<arg>--pinentry-mode</arg>
201+
<arg>loopback</arg>
202+
</gpgArguments>
203+
</configuration>
197204
</plugin>
198205
</plugins>
199206
</build>

0 commit comments

Comments
 (0)