Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set up Release Workflows
Browse files Browse the repository at this point in the history
radcortez committed Oct 11, 2024
1 parent 3815068 commit 2339721
Showing 20 changed files with 227 additions and 1,233 deletions.
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: 2
updates:
- package-ecosystem: maven
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10
4 changes: 4 additions & 0 deletions .github/project.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
name: SmallRye LLM
release:
current-version: 1.0.0-SNAPSHOT
next-version: 1.0.0-SNAPSHOT
64 changes: 64 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: SmallRye Build

on:
push:
branches:
- main
paths-ignore:
- '.gitignore'
- 'CODEOWNERS'
- 'LICENSE'
- 'NOTICE'
- 'README*'
pull_request:
paths-ignore:
- '.gitignore'
- 'CODEOWNERS'
- 'LICENSE'
- 'NOTICE'
- 'README*'

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
java: [11, 17, 21]
name: build with jdk ${{matrix.java}}

steps:
- uses: actions/checkout@v4
name: checkout

- uses: actions/setup-java@v4
name: set up jdk ${{matrix.java}}
with:
distribution: 'temurin'
java-version: ${{matrix.java}}
cache: 'maven'
cache-dependency-path: '**/pom.xml'

- name: build with maven
run: mvn -B formatter:validate verify --file pom.xml

build-windows:
runs-on: windows-latest
strategy:
matrix:
java: [11, 17, 21]
name: build with jdk ${{matrix.java}} windows

steps:
- uses: actions/checkout@v4
name: checkout

- uses: actions/setup-java@v4
name: set up jdk ${{matrix.java}}
with:
distribution: 'temurin'
java-version: ${{matrix.java}}
cache: 'maven'
cache-dependency-path: '**/pom.xml'

- name: build with maven
run: mvn -B formatter:validate verify --file pom.xml
18 changes: 18 additions & 0 deletions .github/workflows/prepare-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: SmallRye Prepare Release

on:
pull_request:
types: [ closed ]
paths:
- '.github/project.yml'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
prepare-release:
name: Prepare Release
if: ${{ github.event.pull_request.merged == true}}
uses: smallrye/.github/.github/workflows/prepare-release.yml@main
secrets: inherit
29 changes: 29 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: SmallRye Release
run-name: Release ${{github.event.inputs.tag || github.ref_name}}
on:
push:
tags:
- '*'
workflow_dispatch:
inputs:
tag:
description: 'Tag to release'
required: true

permissions:
attestations: write
id-token: write
# Needed for the publish-* workflows
contents: write

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
perform-release:
name: Perform Release
uses: smallrye/.github/.github/workflows/perform-release.yml@main
secrets: inherit
with:
version: ${{github.event.inputs.tag || github.ref_name}}
31 changes: 31 additions & 0 deletions .github/workflows/review-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: SmallRye Review Release

on:
pull_request:
paths:
- '.github/project.yml'

jobs:
release:
runs-on: ubuntu-latest
name: pre release

steps:
- uses: radcortez/project-metadata-action@main
name: retrieve project metadata
id: metadata
with:
github-token: ${{secrets.GITHUB_TOKEN}}
metadata-file-path: '.github/project.yml'

- name: Validate version
if: contains(steps.metadata.outputs.current-version, 'SNAPSHOT')
run: |
echo '::error::Cannot release a SNAPSHOT version.'
exit 1
- uses: radcortez/milestone-review-action@main
name: milestone review
with:
github-token: ${{secrets.GITHUB_TOKEN}}
milestone-title: ${{steps.metadata.outputs.current-version}}
17 changes: 17 additions & 0 deletions .github/workflows/update-milestone.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Update Milestone

on:
pull_request_target:
types: [closed]

jobs:
update:
runs-on: ubuntu-latest
name: update-milestone
if: ${{github.event.pull_request.merged == true}}

steps:
- uses: radcortez/milestone-set-action@main
name: milestone set
with:
github-token: ${{secrets.GITHUB_TOKEN}}
6 changes: 4 additions & 2 deletions examples/glassfish-car-booking/pom.xml
Original file line number Diff line number Diff line change
@@ -6,10 +6,11 @@
<artifactId>examples</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>

<artifactId>glassfish-car-booking</artifactId>
<packaging>war</packaging>
<name>glassfish-car-booking Maven Webapp</name>
<url>http://maven.apache.org</url>
<name>SmallRye LLM Examples: Glassfish Car Booking</name>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.release>17</maven.compiler.release>
@@ -18,6 +19,7 @@
<cargo.servlet.port>8080</cargo.servlet.port>
<cargo.zipUrlInstaller.downloadDir>${project.build.directory}/../installs</cargo.zipUrlInstaller.downloadDir>
</properties>

<dependencies>
<dependency>
<groupId>jakarta.platform</groupId>
3 changes: 2 additions & 1 deletion examples/helidon-car-booking-portable-ext/pom.xml
Original file line number Diff line number Diff line change
@@ -12,7 +12,8 @@

<artifactId>helidon-car-booking-portable-ext</artifactId>
<groupId>io.smallrye.llm.examples</groupId>
<version>1.0</version>
<version>1.0.0-SNAPSHOT</version>
<name>SmallRye LLM Examples: Helidon Car Booking Portable Extension</name>

<properties>
<maven.compiler.release>17</maven.compiler.release>
3 changes: 2 additions & 1 deletion examples/helidon-car-booking/pom.xml
Original file line number Diff line number Diff line change
@@ -12,7 +12,8 @@

<artifactId>helidon-car-booking</artifactId>
<groupId>io.smallrye.llm.examples</groupId>
<version>1.0</version>
<version>1.0.0-SNAPSHOT</version>
<name>SmallRye LLM Examples: Helidon Car Booking</name>

<properties>
<maven.compiler.release>17</maven.compiler.release>
9 changes: 7 additions & 2 deletions examples/liberty-car-booking/pom.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>io.smallrye.llm.examples</groupId>
<version>1.0.0-SNAPSHOT</version>
<parent>
<groupId>io.smallrye.llm.examples</groupId>
<artifactId>examples</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>

<artifactId>liberty-car-booking</artifactId>
<packaging>war</packaging>
<name>SmallRye LLM Examples: Liberty Car Booking</name>

<developers>
<developer>
Original file line number Diff line number Diff line change
@@ -11,21 +11,21 @@
import jakarta.enterprise.inject.Produces;
import jakarta.inject.Inject;

import org.eclipse.microprofile.config.inject.ConfigProperty;

import dev.langchain4j.data.document.Document;
import dev.langchain4j.data.document.parser.TextDocumentParser;
import dev.langchain4j.data.document.splitter.DocumentSplitters;
import dev.langchain4j.model.embedding.onnx.allminilml6v2.AllMiniLmL6V2EmbeddingModel;
import dev.langchain4j.model.embedding.EmbeddingModel;
import dev.langchain4j.model.embedding.onnx.allminilml6v2.AllMiniLmL6V2EmbeddingModel;
import dev.langchain4j.store.embedding.EmbeddingStoreIngestor;
import dev.langchain4j.store.embedding.inmemory.InMemoryEmbeddingStore;
import lombok.extern.java.Log;

import org.eclipse.microprofile.config.inject.ConfigProperty;

@Log
@ApplicationScoped
public class DocRagIngestor {

// Used by ContentRetriever
@Produces
private EmbeddingModel embeddingModel = new AllMiniLmL6V2EmbeddingModel();
@@ -34,8 +34,8 @@ public class DocRagIngestor {
@Produces
private InMemoryEmbeddingStore embeddingStore = new InMemoryEmbeddingStore<>();

// private File docs = new File(System.getProperty("docragdir"));
// private File docs = new File(System.getProperty("docragdir"));

@Inject
@ConfigProperty(name = "app.docs-for-rag.dir")
private File docs;
1 change: 1 addition & 0 deletions examples/pom.xml
Original file line number Diff line number Diff line change
@@ -9,6 +9,7 @@
</parent>
<artifactId>examples</artifactId>
<groupId>io.smallrye.llm.examples</groupId>
<name>SmallRye LLM Examples: Parent</name>

<packaging>pom</packaging>

4 changes: 2 additions & 2 deletions examples/quarkus-car-booking/pom.xml
Original file line number Diff line number Diff line change
@@ -7,10 +7,10 @@
<artifactId>examples</artifactId>
<groupId>io.smallrye.llm.examples</groupId>
<version>1.0.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<artifactId>quarkus-car-booking</artifactId>
<version>1.0</version>
<name>SmallRye LLM Examples: Quarkus Car Booking</name>

<properties>
<compiler-plugin.version>3.12.1</compiler-plugin.version>
Loading

0 comments on commit 2339721

Please sign in to comment.