Skip to content

Adds hard key

Adds hard key #22

Workflow file for this run

# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: Master
on:
push:
branches:
- 'master'
- 'hotfix/**'
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ 8, 11 ]
steps:
- uses: actions/checkout@v2
- name: Build with Maven
run: mvn clean install
deploy:
needs: build
runs-on: ubuntu-latest
strategy:
matrix:
java: [ 11 ]
steps:
- uses: actions/checkout@v2
- name: Set up JDK
uses: actions/setup-java@v2
with:
java-version: 11
server-id: ossrh
distribution: adopt
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.GPG_SECRET_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: list-keys
run: |
gpg --list-keys --keyid-format LONG
- name: Get GPG Key ID
id: gpg-key-id
run: |
gpg --list-secret-keys --keyid-format LONG | grep '^sec' | awk '{print $2}' | cut -d'/' -f2
- name: Extend GPG key expiration
run: |
echo -e "expire\n1y\nsave" | gpg --batch --command-fd 0 --edit-key C2B7EEEC51372BAB
- name: Publish package to maven central
run: mvn --batch-mode clean deploy -P central-deploy -DskipTests=true --update-snapshots -Prelease
env:
MAVEN_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}