Skip to content
Permalink
Browse files
release maven package by actions (#88)
  • Loading branch information
coderzc committed Dec 21, 2021
1 parent 4a1926f commit 8f0f2ba012e06b67b8084938e545a6b12c78309a
Showing 2 changed files with 46 additions and 0 deletions.
@@ -0,0 +1,39 @@
name: release maven package

on:
release:
types: [ published ]

jobs:
build:
runs-on: ubuntu-20.04
steps:
- name: Install JDK 8
uses: actions/setup-java@v2
with:
java-version: '8'
distribution: 'zulu'

- name: Cache Maven packages
uses: actions/cache@v2
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2

- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 2

- name: Release Maven package
uses: samuelmeuli/action-maven-publish@v1
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg_passphrase: ${{ secrets.GPG_PASSPHRASE }}
nexus_username: ${{ secrets.NEXUS_USERNAME }}
nexus_password: ${{ secrets.NEXUS_PASSWORD }}
server_id: sonatype-nexus-staging
maven_profiles: "release"
maven_args: >
-Dmaven.test.skip=true
@@ -211,6 +211,13 @@
</goals>
</execution>
</executions>
<configuration>
<!-- Prevent `gpg` from using pinentry programs -->
<gpgArguments>
<arg>--pinentry-mode</arg>
<arg>loopback</arg>
</gpgArguments>
</configuration>
</plugin>
</plugins>
</build>

0 comments on commit 8f0f2ba

Please sign in to comment.