Skip to content

Commit

Permalink
release maven package by actions (#88)
Browse files Browse the repository at this point in the history
coderzc authored Dec 21, 2021
1 parent 4a1926f commit 8f0f2ba
Showing 2 changed files with 46 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -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
7 changes: 7 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -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.