From d5150a6a6702411fd3470e7e813b49fa0c1cf51a Mon Sep 17 00:00:00 2001 From: Bryan Clark Date: Fri, 29 Nov 2019 09:26:29 -0800 Subject: [PATCH] Add publish to Maven Central example to README --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index 38e9b94..9c94aef 100644 --- a/README.md +++ b/README.md @@ -76,6 +76,15 @@ jobs: run: mvn -B package --file pom.xml - name: Publish to GitHub Packages Apache Maven run: mvn deploy + - name: Set up Apache Maven Central + uses: actions/setup-java@master + with: # running setup-java again overwrites the settings.xml + java-version: 1.8 + server-id: maven + username: maven_username + password: ${{ secrets.MAVEN_CENTRAL_TOKEN }} # password from secrets store + - name: Publish to Apache Maven Central + run: mvn deploy ``` See the help docs on [Publishing a Package](https://help.github.com/en/github/managing-packages-with-github-packages/configuring-apache-maven-for-use-with-github-packages#publishing-a-package) for more information on the `pom.xml` file.