Skip to content

Commit

Permalink
Merge pull request #223 from eckig/jreleaser
Browse files Browse the repository at this point in the history
JReleaser
  • Loading branch information
eckig authored Oct 27, 2024
2 parents 7d58a5f + 4126c0b commit f40cdf7
Show file tree
Hide file tree
Showing 5 changed files with 116 additions and 53 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Publish package to the Maven Central Repository
on:
push:
tags:
- v*
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Java
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
- name: Publish package
env:
JRELEASER_NEXUS2_USERNAME: ${{ secrets.JRELEASER_NEXUS2_USERNAME }}
JRELEASER_NEXUS2_PASSWORD: ${{ secrets.JRELEASER_NEXUS2_PASSWORD }}
JRELEASER_GPG_PASSPHRASE: ${{ secrets.JRELEASER_GPG_PASSPHRASE }}
JRELEASER_GPG_SECRET_KEY: ${{ secrets.JRELEASER_GPG_SECRET_KEY }}
JRELEASER_GPG_PUBLIC_KEY: ${{ secrets.JRELEASER_GPG_PUBLIC_KEY }}
JRELEASER_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: mvn -Prelease deploy -pl :grapheditor-core -am
run: mvn -Prelease deploy jreleaser:deploy
6 changes: 4 additions & 2 deletions api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,20 @@
<groupId>io.github.eckig.grapheditor</groupId>
<artifactId>grapheditor-api</artifactId>
<packaging>jar</packaging>
<description>A library for creating and editing graph-like diagrams in JavaFX</description>
<url>https://github.com/eckig/graph-editor</url>
<parent>
<groupId>io.github.eckig</groupId>
<artifactId>grapheditor</artifactId>
<version>19.0.0</version>
<version>21.0.0</version>
</parent>
<name>${component.name}::API</name>

<dependencies>
<dependency>
<groupId>io.github.eckig.grapheditor</groupId>
<artifactId>grapheditor-model</artifactId>
<version>18.0.1</version>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.emf</groupId>
Expand Down
8 changes: 5 additions & 3 deletions core/pom.xml
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

<modelVersion>4.0.0</modelVersion>
<groupId>io.github.eckig.grapheditor</groupId>
<artifactId>grapheditor-core</artifactId>
<packaging>jar</packaging>
<description>A library for creating and editing graph-like diagrams in JavaFX</description>
<url>https://github.com/eckig/graph-editor</url>
<parent>
<groupId>io.github.eckig</groupId>
<artifactId>grapheditor</artifactId>
<version>19.0.0</version>
<version>21.0.0</version>
</parent>
<name>${component.name}::Core</name>

<dependencies>
<dependency>
<groupId>io.github.eckig.grapheditor</groupId>
<artifactId>grapheditor-api</artifactId>
<version>18.0.1</version>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.emf</groupId>
Expand Down
4 changes: 3 additions & 1 deletion model/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@
<groupId>io.github.eckig.grapheditor</groupId>
<artifactId>grapheditor-model</artifactId>
<packaging>jar</packaging>
<description>A library for creating and editing graph-like diagrams in JavaFX</description>
<url>https://github.com/eckig/graph-editor</url>
<parent>
<groupId>io.github.eckig</groupId>
<artifactId>grapheditor</artifactId>
<version>19.0.0</version>
<version>21.0.0</version>
</parent>
<name>${component.name}::Model</name>

Expand Down
126 changes: 79 additions & 47 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
<name>${component.name}</name>
<groupId>io.github.eckig</groupId>
<artifactId>grapheditor</artifactId>
<version>19.0.0</version>
<version>21.0.0</version>
<packaging>pom</packaging>
<inceptionYear>2014</inceptionYear>

<description>A library for creating and editing graph-like diagrams in JavaFX</description>
<url>https://github.com/eckig/graph-editor</url>
Expand Down Expand Up @@ -108,51 +109,82 @@
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.3.1</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.10.1</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
<configuration>
<doclint>none</doclint>
<quiet>true</quiet>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.2.7</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>release</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.10.1</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
<configuration>
<doclint>none</doclint>
<quiet>true</quiet>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.3.1</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.jreleaser</groupId>
<artifactId>jreleaser-maven-plugin</artifactId>
<version>1.14.0</version>
<inherited>false</inherited>
<configuration>
<jreleaser>
<signing>
<active>ALWAYS</active>
<armored>true</armored>
</signing>
<deploy>
<maven>
<nexus2>
<maven-central>
<active>ALWAYS</active>
<url>https://s01.oss.sonatype.org/service/local</url>
<closeRepository>false</closeRepository>
<releaseRepository>false</releaseRepository>
<stagingRepositories>target/staging-deploy</stagingRepositories>
</maven-central>
</nexus2>
</maven>
</deploy>
</jreleaser>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>3.1.1</version>
<configuration>
<altDeploymentRepository>local::file:./target/staging-deploy</altDeploymentRepository>
<altReleaseDeploymentRepository>local::file:./target/staging-deploy</altReleaseDeploymentRepository>
<altSnapshotDeploymentRepository>local::file:./target/staging-deploy</altSnapshotDeploymentRepository>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>

0 comments on commit f40cdf7

Please sign in to comment.