Skip to content

Commit e9b73e0

Browse files
committed
Write settings.xml via action
1 parent ab4fed9 commit e9b73e0

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

.github/workflows/build.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,14 @@ jobs:
2727
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
2828
restore-keys: ${{ runner.os }}-m2
2929

30+
- name: Write Maven Settings
31+
uses: whelk-io/maven-settings-xml-action@v14
32+
with:
33+
servers: '[{ "id": "github", "username": "${{ github.actor }}", "password": "${{ secrets.GITHUB_TOKEN }}" }]'
34+
3035
- name: Build with Maven
3136
run: |
32-
mvn --batch-mode --settings settings.xml package
37+
mvn --batch-mode package
3338
3439
- name: Archive Build Output
3540
uses: actions/upload-artifact@v2
@@ -47,6 +52,6 @@ jobs:
4752
4853
- name: Publish package
4954
if: github.event_name == 'release'
50-
run: mvn --batch-mode --settings settings.xml deploy
55+
run: mvn --batch-mode deploy
5156
env:
5257
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)