updates command #23
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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: Extend GPG key expiration | |
run: | | |
echo -e "expire\n1y\nsave" > gpg_commands.txt | |
gpg --batch --command-file gpg_commands.txt --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 }} | |