Skip to content

Commit

Permalink
#217 Configure JReleaser for deployments to Maven Central
Browse files Browse the repository at this point in the history
  • Loading branch information
aalmiray committed Nov 5, 2023
1 parent d84c377 commit b0ea885
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Expand Up @@ -82,14 +82,14 @@ jobs:
export GPG_TTY=$(tty)
./mvnw -ntp -B --file pom.xml \
-Drepository.url=https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git \
-Dmaven.site.skip=true -Drelease=true deploy
-Dmaven.site.skip=true -Ppublication,stage
- name: Release to GitHub
env:
JRELEASER_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
JRELEASER_BRANCH: ${{ env.BRANCH }}
run: |
./mvnw -B --file pom.xml -pl :moditect-parent -Pjreleaser jreleaser:release
./mvnw -ntp -B --file pom.xml -pl :moditect-parent -Pjreleaser jreleaser:release
- name: JReleaser output
if: always()
Expand Down
2 changes: 2 additions & 0 deletions core/pom.xml
Expand Up @@ -29,6 +29,8 @@
<artifactId>moditect</artifactId>
<packaging>jar</packaging>
<name>ModiTect</name>
<url>https://github.com/moditect/moditect</url>
<description>Module system tooling</description>

<dependencies>
<dependency>
Expand Down
2 changes: 2 additions & 0 deletions maven-plugin/pom.xml
Expand Up @@ -28,6 +28,8 @@
<artifactId>moditect-maven-plugin</artifactId>
<packaging>maven-plugin</packaging>
<name>ModiTect Maven Plug-In</name>
<url>https://github.com/moditect/moditect</url>
<description>ModiTect Maven Plug-In</description>

<dependencyManagement>
<dependencies>
Expand Down
27 changes: 27 additions & 0 deletions parent/pom.xml
Expand Up @@ -171,6 +171,15 @@
</build>

<profiles>
<profile>
<id>stage</id>
<properties>
<altDeploymentRepository>local::file:${rootdir}/target/staging-deploy</altDeploymentRepository>
</properties>
<build>
<defaultGoal>deploy</defaultGoal>
</build>
</profile>
<profile>
<id>jreleaser</id>
<build>
Expand All @@ -190,6 +199,24 @@
<documentation>https://github.com/moditect/moditect</documentation>
</links>
</project>
<signing>
<active>ALWAYS</active>
<armored>true</armored>
</signing>
<deploy>
<maven>
<nexus2>
<maven-central>
<active>ALWAYS</active>
<url>https://oss.sonatype.org/service/local</url>
<snapshotUrl>https://oss.sonatype.org/content/repositories/snapshots/</snapshotUrl>
<closeRepository>true</closeRepository>
<releaseRepository>true</releaseRepository>
<stagingRepositories>target/staging-deploy</stagingRepositories>
</maven-central>
</nexus2>
</maven>
</deploy>
<release>
<github>
<tagName>{{projectVersion}}</tagName>
Expand Down

0 comments on commit b0ea885

Please sign in to comment.