Skip to content

Commit 6166280

Browse files
committed
Add Maven server credentials to workflow
Pass Maven server credentials to the setup-java step so the Publish package step can authenticate. Adds server-id 'ossrh' and maps server-username/server-password to MAVEN_USERNAME and MAVEN_PASSWORD (expected as repo secrets) for publishing to OSSRH.
1 parent f0b76c5 commit 6166280

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

.github/workflows/maven-publish.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ jobs:
4040
with:
4141
java-version: '11'
4242
distribution: 'temurin'
43+
server-id: ossrh
44+
server-username: MAVEN_USERNAME
45+
server-password: MAVEN_PASSWORD
4346

4447
- name: Publish package
4548
run: ./mvnw

0 commit comments

Comments
 (0)