From 6c4d365ded24b5ad83aace0bdfab848a0fe2887e Mon Sep 17 00:00:00 2001 From: bsorrentino Date: Thu, 1 Aug 2024 15:36:48 +0200 Subject: [PATCH 1/8] build: update version to next release --- adaptive-rag/pom.xml | 2 +- agent-executor/pom.xml | 2 +- core-jdk8/pom.xml | 2 +- image-to-diagram/pom.xml | 2 +- pom.xml | 2 +- server-jetty/pom.xml | 5 +++-- 6 files changed, 8 insertions(+), 7 deletions(-) diff --git a/adaptive-rag/pom.xml b/adaptive-rag/pom.xml index 2b9e608..b28b475 100644 --- a/adaptive-rag/pom.xml +++ b/adaptive-rag/pom.xml @@ -4,7 +4,7 @@ org.bsc.langgraph4j langgraph4j-parent - 1.0-SNAPSHOT + 1.0-beta1 langgraph4j-adaptive-rag diff --git a/agent-executor/pom.xml b/agent-executor/pom.xml index 2d770dc..4b50b9b 100644 --- a/agent-executor/pom.xml +++ b/agent-executor/pom.xml @@ -4,7 +4,7 @@ org.bsc.langgraph4j langgraph4j-parent - 1.0-SNAPSHOT + 1.0-beta1 langgraph4j-agent-executor diff --git a/core-jdk8/pom.xml b/core-jdk8/pom.xml index 0a73feb..efabba1 100644 --- a/core-jdk8/pom.xml +++ b/core-jdk8/pom.xml @@ -5,7 +5,7 @@ org.bsc.langgraph4j langgraph4j-parent - 1.0-SNAPSHOT + 1.0-beta1 langgraph4j-jdk8 diff --git a/image-to-diagram/pom.xml b/image-to-diagram/pom.xml index 65765c2..e97d907 100644 --- a/image-to-diagram/pom.xml +++ b/image-to-diagram/pom.xml @@ -4,7 +4,7 @@ org.bsc.langgraph4j langgraph4j-parent - 1.0-SNAPSHOT + 1.0-beta1 langgraph4j-image-to-diagram diff --git a/pom.xml b/pom.xml index 10b2ff5..534e73b 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.bsc.langgraph4j langgraph4j-parent - 1.0-SNAPSHOT + 1.0-beta1 pom langgraph4j::parent diff --git a/server-jetty/pom.xml b/server-jetty/pom.xml index 3f77603..82449be 100644 --- a/server-jetty/pom.xml +++ b/server-jetty/pom.xml @@ -6,7 +6,7 @@ org.bsc.langgraph4j langgraph4j-parent - 1.0-SNAPSHOT + 1.0-beta1 langgraph4j-server-jetty @@ -138,7 +138,8 @@ java - -Djava.util.logging.config.file=${project.basedir}/logging.properties + -Djava.util.logging.config.file=${project.basedir}/ + logging.properties -classpath org.bsc.langgraph4j.AdaptiveRAGStreamingServer From ccf6282e9ab9d5eba48adc8b56d307b9f4103b5e Mon Sep 17 00:00:00 2001 From: bsorrentino Date: Thu, 1 Aug 2024 15:50:44 +0200 Subject: [PATCH 2/8] refactor: rename core module from langgraph4j-jdk8 to langgraph4j--core-jdk8 --- adaptive-rag/pom.xml | 2 +- agent-executor/pom.xml | 2 +- core-jdk8/pom.xml | 2 +- image-to-diagram/pom.xml | 2 +- server-jetty/pom.xml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/adaptive-rag/pom.xml b/adaptive-rag/pom.xml index b28b475..3df6e43 100644 --- a/adaptive-rag/pom.xml +++ b/adaptive-rag/pom.xml @@ -19,7 +19,7 @@ org.bsc.langgraph4j - langgraph4j-jdk8 + langgraph4j-core-jdk8 ${project.version} diff --git a/agent-executor/pom.xml b/agent-executor/pom.xml index 4b50b9b..a59d6fc 100644 --- a/agent-executor/pom.xml +++ b/agent-executor/pom.xml @@ -19,7 +19,7 @@ org.bsc.langgraph4j - langgraph4j-jdk8 + langgraph4j-core-jdk8 ${project.version} diff --git a/core-jdk8/pom.xml b/core-jdk8/pom.xml index efabba1..ab237d2 100644 --- a/core-jdk8/pom.xml +++ b/core-jdk8/pom.xml @@ -8,7 +8,7 @@ 1.0-beta1 - langgraph4j-jdk8 + langgraph4j-core-jdk8 jar langgraph4j::core::jdk8 A library for building stateful, multi-agents applications with LLMs diff --git a/image-to-diagram/pom.xml b/image-to-diagram/pom.xml index e97d907..4d22533 100644 --- a/image-to-diagram/pom.xml +++ b/image-to-diagram/pom.xml @@ -19,7 +19,7 @@ org.bsc.langgraph4j - langgraph4j-jdk8 + langgraph4j-core-jdk8 ${project.version} diff --git a/server-jetty/pom.xml b/server-jetty/pom.xml index 82449be..e9179bd 100644 --- a/server-jetty/pom.xml +++ b/server-jetty/pom.xml @@ -30,7 +30,7 @@ org.bsc.langgraph4j - langgraph4j-jdk8 + langgraph4j-core-jdk8 ${project.version} provided From 13afc2265e2d4a2409c1bde1bfc4f7f9f6f9899c Mon Sep 17 00:00:00 2001 From: bsorrentino Date: Thu, 1 Aug 2024 15:51:00 +0200 Subject: [PATCH 3/8] docs: update readme --- README.md | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 82534e4..330e765 100644 --- a/README.md +++ b/README.md @@ -24,14 +24,24 @@ ### Adding LangGraph dependency -> 👉 Currently are available only the developer SNAPSHOTs +#### Last stable version **Maven** +```xml + + org.bsc.langgraph4j + langgraph4j-core-jdk8 + 1.0-beta1 + +``` + +#### Development Version +**Maven** ```xml org.bsc.langgraph4j - langgraph4j-jdk8 + langgraph4j-core-jdk8 1.0-SNAPSHOT ``` From ab8db1d51e28c7ef99cb7867406fc4a6dccc4be1 Mon Sep 17 00:00:00 2001 From: bsorrentino Date: Thu, 1 Aug 2024 22:55:58 +0200 Subject: [PATCH 4/8] ci: add github action for deployment --- .github/workflows/deploy.yaml | 38 +++++++++++++++++++ gpg-setup.sh | 9 +++++ settings-template.xml | 70 +++++++++++++++++++++++++++++++++++ 3 files changed, 117 insertions(+) create mode 100644 .github/workflows/deploy.yaml create mode 100755 gpg-setup.sh create mode 100644 settings-template.xml diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml new file mode 100644 index 0000000..971c5d2 --- /dev/null +++ b/.github/workflows/deploy.yaml @@ -0,0 +1,38 @@ +# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created +# For more information see: https://github.com/actions/setup-java#apache-maven-with-a-settings-path + +name: Deploy New Version + +on: + workflow_dispatch: + release: + types: [created] + +jobs: + deploy-jdk8: + + runs-on: ubuntu-latest + strategy: + matrix: + java: [ '8', '17' ] + name: Java ${{ matrix.Java }} deploy + steps: + - uses: actions/checkout@v4 + with: + ref: main + - name: Set up JDK ${{ matrix.java }} + uses: actions/setup-java@v4 + with: + distribution: 'liberica' + java-version: ${{ matrix.java }} + java-package: jdk + - name: GPG Setup + env: + GPG_KEY_BASE64: ${{ secrets.GPG_KEY_BASE64 }} + GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} + run: ./gpg-setup.sh + - name: Deploy to OSS Sonatype + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + OSS_SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} + run: mvn -B -Prelease source:jar javadoc:jar deploy --file pom.xml -s settings-template.xml -Dgpg.passphrase=${{ secrets.GPG_PASSPHRASE }} diff --git a/gpg-setup.sh b/gpg-setup.sh new file mode 100755 index 0000000..6a93b18 --- /dev/null +++ b/gpg-setup.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +# +# Prepare GPG Key is expected to be in base64 +# Exported with gpg -a --export-secret-keys "your@email" | base64 > gpg.base64 +# +printf "$GPG_KEY_BASE64" | base64 --decode > gpg.asc +echo ${GPG_PASSPHRASE} | gpg --batch --yes --passphrase-fd 0 --import gpg.asc +gpg -k \ No newline at end of file diff --git a/settings-template.xml b/settings-template.xml new file mode 100644 index 0000000..e86152f --- /dev/null +++ b/settings-template.xml @@ -0,0 +1,70 @@ + + + + + + sonatype-server + yEKudvqX + ${env.OSS_SONATYPE_TOKEN} + + + + github + bsorrentino + ${env.GITHUB_TOKEN} + + + + + + + + sonatype + + true + + + sonatype-server + https://oss.sonatype.org/content/repositories/snapshots + sonatype-server + https://oss.sonatype.org/service/local/staging/deploy/maven2/ + https://oss.sonatype.org/content/groups/public/ + + + + + + sonatype-server + sonatype snapshots + ${snapshot.repo.url} + + true + + + false + + + + + + + + + sonatype-server + sonatype snapshots + ${snapshot.repo.url} + + + always + ignore + + + + + + + + + + From c66fc6b1774cc90e617668ae57bca1a0de02a80d Mon Sep 17 00:00:00 2001 From: bsorrentino Date: Thu, 1 Aug 2024 23:20:53 +0200 Subject: [PATCH 5/8] docs: update changelog template --- scripts/changelog.mustache | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/scripts/changelog.mustache b/scripts/changelog.mustache index 1910031..dc35e68 100644 --- a/scripts/changelog.mustache +++ b/scripts/changelog.mustache @@ -77,5 +77,18 @@ {{/commits}} {{/ifContainsType}} +{{#ifContainsType commits type='ci'}} +### Continuous Integration + + {{#commits}} + {{#ifCommitType . type='ci'}} + - {{#eachCommitScope .}} **{{.}}** {{/eachCommitScope}} {{{commitDescription .}}} ([{{hash}}](https://github.com/bsorrentino/langgraph4j/commit/{{hashFull}})) + {{#messageBodyItems}} > {{.}} + {{/messageBodyItems}} + + {{/ifCommitType}} + {{/commits}} +{{/ifContainsType}} + {{/tags}} From 3a195394e5b33792b7340590ef6bd6195c1fb6ce Mon Sep 17 00:00:00 2001 From: bsorrentino Date: Fri, 2 Aug 2024 11:17:48 +0200 Subject: [PATCH 6/8] ci: add maven plugin for deployment working on #4 --- pom.xml | 51 +++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 41 insertions(+), 10 deletions(-) diff --git a/pom.xml b/pom.xml index 534e73b..38601be 100644 --- a/pom.xml +++ b/pom.xml @@ -28,15 +28,6 @@ - @@ -120,6 +111,47 @@ + + + + org.apache.maven.plugins + maven-gpg-plugin + 3.2.4 + + + sign-artifacts + verify + + sign + + + + + bartolomeo.sorrentino@gmail.com + + --pinentry-mode + loopback + + + + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.7.0 + true + + sonatype-server + https://oss.sonatype.org/ + true + + + @@ -152,7 +184,6 @@ server-jetty - From feeb46eb2b3f9e9750f5a182c6d30b64c0a142f4 Mon Sep 17 00:00:00 2001 From: bsorrentino Date: Fri, 2 Aug 2024 11:18:02 +0200 Subject: [PATCH 7/8] docs: update readme --- README.md | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 330e765..e7f9f30 100644 --- a/README.md +++ b/README.md @@ -9,15 +9,9 @@ ## News -| Date | Release | info -|--------------| --- | --- -| Jul 29, 2024 | `1.0-SNAPSHOT` | upgrade to langchain4j 0.33.0. improve **Playground Webapp** -| Jul 19, 2024 | `1.0-SNAPSHOT` | Add support of an embed **Playground Webapp** able to run Langgrap4j flow - [issue #9](https://github.com/bsorrentino/langgraph4j/issues/9) -| Jun 21, 2024 | `1.0-SNAPSHOT` | Add support of [Mermaid] diagram generation - [issue #5](https://github.com/bsorrentino/langgraph4j/issues/5) -| Jun 19, 2024 | `1.0-SNAPSHOT` | Add [adaptive rag](adaptice-rag/README.md) sample -| Jun 10, 2024 | `1.0-SNAPSHOT` | Refactoring how generate graph representation (plantuml) -| May 20, 2024 | `1.0-SNAPSHOT` | Add "[Image To PlantUML Diagram](agents-jdk8/README.md#generate-plantuml-diagram-from-image)" sample -| May 18, 2024 | `1.0-SNAPSHOT` | Add `getGraph()` method to `CompiledGraph` to return a [PlantUML] representation of your Graph +| Date | Release | info +|--------------|----------------| --- +| Aug 02, 2024 | `1.0-beta1` | first official beta release ## Quick Start From c96574d32dd2395ad4afe861a4b013e1f96b9573 Mon Sep 17 00:00:00 2001 From: bsorrentino Date: Fri, 2 Aug 2024 11:23:59 +0200 Subject: [PATCH 8/8] docs: update readme --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e7f9f30..14f5f8a 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,8 @@ # LangGraph for Java -[![Javadoc](https://img.shields.io/badge/Javadoc-Documentation-blue)][javadocs] [![Static Badge](https://img.shields.io/badge/maven--snapshots-1.0--SNAPSHOT-blue)][snapshots] [![Maven Central](https://img.shields.io/maven-central/v/org.bsc.langgraph4j-jdk8/langgraph4j-jdk8.svg)]() +[![Javadoc](https://img.shields.io/badge/Javadoc-Documentation-blue)][javadocs] [![Static Badge](https://img.shields.io/badge/maven--snapshots-1.0--SNAPSHOT-blue)] +[snapshots] [![Maven Central](https://img.shields.io/maven-central/v/org.bsc.langgraph4j/langgraph4j-core-jdk8.svg)]() 🦜🕸️LangGraph for Java. A library for building stateful, multi-agents applications with LLMs, built for work with [langchain4j] > It is a porting of original [LangGraph] from [LangChain AI project][langchain.ai] in Java fashion