Skip to content

Commit d5b09bb

Browse files
authored
Update maven-publish.yml
1 parent 29ca65d commit d5b09bb

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

.github/workflows/maven-publish.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,21 @@
1-
name: Publish package to the Maven Central Repository
1+
name: Publish package to GitHub Packages
22
on:
33
workflow_dispatch:
44
release:
55
types: [created]
66
jobs:
77
publish:
88
runs-on: ubuntu-latest
9+
permissions:
10+
contents: read
11+
packages: write
912
steps:
1013
- uses: actions/checkout@v4
11-
- name: Set up Maven Central Repository
12-
uses: actions/setup-java@v4
14+
- uses: actions/setup-java@v4
1315
with:
1416
java-version: '21'
1517
distribution: 'temurin'
16-
server-id: ossrh
17-
server-username: MAVEN_USERNAME
18-
server-password: MAVEN_PASSWORD
1918
- name: Publish package
2019
run: mvn --batch-mode deploy
2120
env:
22-
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
23-
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
21+
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}

0 commit comments

Comments
 (0)