Skip to content

Commit 018c298

Browse files
committed
ci(release): correct settings for GH mvn package authentication
1 parent 0c954d5 commit 018c298

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

.github/workflows/maven-publish.yaml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,19 @@ jobs:
2121
with:
2222
step: restore
2323
- name: Set up JDK 11
24-
uses: actions/setup-java@v3
24+
uses: actions/setup-java@v2
2525
with:
2626
java-version: '11'
27-
distribution: 'adopt'
28-
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
29-
settings-path: ${{ github.workspace }} # location for the settings.xml file
30-
31-
- name: Build with Maven
32-
run: mvn -B -U package -s $GITHUB_WORKSPACE/settings.xml --file pom.xml
33-
27+
distribution: 'temurin'
28+
- name: maven-settings
29+
uses: s4u/maven-settings-action@v2
30+
with:
31+
servers: '[{"id": "github", "username": "dummy", "password": "${env.GITHUB_TOKEN}"}]'
32+
githubServer: false
3433
- name: Publish to GitHub Packages Apache Maven
35-
run: mvn deploy -s $GITHUB_WORKSPACE/settings.xml
34+
run: mvn -B -U deploy
3635
env:
3736
GITHUB_TOKEN: ${{ github.token }}
38-
3937
- uses: skjolber/maven-cache-github-action@v1
4038
with:
4139
step: save

0 commit comments

Comments
 (0)