Skip to content

Commit

Permalink
Update mavenpublish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
sudiptasish committed Apr 9, 2020
1 parent 16a91e9 commit bbe9e83
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions .github/workflows/mavenpublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,13 @@ jobs:
with:
java-version: 1.8
settings-path: ${{ github.workspace }} # location for the settings.xml file

- name: Build with Maven
run: mvn -B package --file pom.xml

- name: Publish to GitHub Packages Apache Maven
run: mvn -DskipTests -Dgpg.skip deploy -s $GITHUB_WORKSPACE/settings.xml
env:
GITHUB_TOKEN: ${{ github.token }} # GITHUB_TOKEN is the default env for the password

- name: Set up Apache Maven Central
uses: actions/setup-java@v1
with: # running setup-java again overwrites the settings.xml
java-version: 1.8
server-id: SERVER_ID # Value of the distributionManagement/repository/id field of the pom.xml
server-username: SERVER_USERNAME # env variable for username in deploy
server-password: SERVER_PASSWORD # env variable for token in deploy

- name: Build with Maven
run: mvn -B package --file pom.xml

- name: Publish to Apache Maven Central
run: mvn -B -e -X deploy -DskipTests -Dgpg.skip -s $GITHUB_WORKSPACE/settings.xml
env:
Expand Down

0 comments on commit bbe9e83

Please sign in to comment.