Allow for alternate settings.xml file location

Use the m2-home to specify a new location for the settings.xml file
This commit is contained in:
Bryan Clark
2019-12-10 10:03:33 -08:00
parent 4757680fc9
commit ae11e1a1b6
4 changed files with 36 additions and 4 deletions

View File

@ -137,11 +137,11 @@ jobs:
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
username: ${{ github.actor }} # username for server authentication
password: ${{ github.token }} # password or token for authentication
m2-home: ${{ $GITHUB_WORKSPACE }} # location of the .m2 directory
m2-home: ${{ $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 deploy
run: mvn deploy -s ${{ $GITHUB_WORKSPACE }}/settings.xml
```
# License