-
Notifications
You must be signed in to change notification settings - Fork 0
83 lines (81 loc) · 2.58 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: Publish package to GitHub Packages
on:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- vector-db: chroma
model-api: openai
jar-base-name: robert-openai-chroma
- vector-db: chroma
model-api: ollama
jar-base-name: robert-ollama-chroma
- vector-db: pgvector
model-api: openai
jar-base-name: robert-openai-pgvector
- vector-db: pgvector
model-api: ollama
jar-base-name: robert-ollama-pgvector
- vector-db: redis
model-api: openai
jar-base-name: robert-openai-redis
- vector-db: redis
model-api: ollama
jar-base-name: robert-ollama-redis
- vector-db: weaviate
model-api: openai
jar-base-name: robert-openai-weaviate
- vector-db: weaviate
model-api: ollama
jar-base-name: robert-ollama-weaviate
steps:
- uses: actions/checkout@v4
- uses: gradle/actions/wrapper-validation@v4
- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: liberica
java-version: 21
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Build artifact
run: |
./gradlew clean setVersion -PnewVersion=${{ github.event.release.tag_name }}
cat gradle.properties
./gradlew build -Pvector-db-provider=${{ matrix.vector-db }} -Pmodel-api-provider=${{ matrix.model-api }} -PjarBaseName=${{ matrix.jar-base-name }}
echo "Contents of build/libs:"
ls -l build/libs
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.jar-base-name }}
path: build/libs/${{ matrix.jar-base-name }}-${{ github.event.release.tag_name }}.jar
if-no-files-found: error
retention-days: 1
publish:
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
checks: write
actions: read
issues: read
packages: write
pull-requests: read
repository-projects: read
statuses: read
steps:
- name: Download all artifacts
uses: actions/download-artifact@v4
- name: Publish assets and generate release notes
uses: softprops/action-gh-release@v2
with:
files: |
*/*.jar
fail_on_unmatched_files: true
generate_release_notes: true
token: ${{ secrets.GITHUB_TOKEN }}