Skip to content

Commit

Permalink
Fix deployment to Maven Central repo
Browse files Browse the repository at this point in the history
  • Loading branch information
stijn-dejongh committed Nov 20, 2024
1 parent f78cf23 commit 7cf92fb
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 6 deletions.
20 changes: 17 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Publish package to GitHub Packages
name: Publish package to the Maven Central Repository and GitHub Packages
on:
release:
types: [created]
Expand All @@ -10,11 +10,25 @@ jobs:
packages: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
- name: Set up Java for publishing to Maven Central Repository
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
- name: Publish package
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- name: Publish to the Maven Central Repository
run: mvn --batch-mode deploy
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
- name: Set up Java for publishing to GitHub Packages
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
- name: Publish to GitHub Packages
run: mvn --batch-mode deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.5.0</version>
<version>3.6.3</version>
<configuration>
<stylesheet>maven</stylesheet>
<javadocDirectory>commons/src/main/javadoc</javadocDirectory>
Expand All @@ -175,7 +175,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.2.0</version>
<version>3.6.3</version>
<configuration>
<show>public</show>
<nohelp>true</nohelp>
Expand Down Expand Up @@ -330,7 +330,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.2.0</version>
<version>3.6.3</version>
<configuration>
<reportOutputDirectory>docs/javadoc</reportOutputDirectory>
<destDir>javadoc</destDir>
Expand Down

0 comments on commit 7cf92fb

Please sign in to comment.