Publish package to GitHub Packages #5
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish package to GitHub Packages | |
on: | |
release: | |
types: [created] | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
checks: write | |
actions: read | |
issues: read | |
packages: write | |
pull-requests: read | |
repository-projects: read | |
statuses: read | |
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: Install GitHub CLI | |
run: | | |
sudo apt update && sudo apt install gh -y | |
- name: Publish package, target Chroma vector store and leverage OpenAI API for model interaction | |
run: | | |
./gradlew clean setVersion -PnewVersion=${{ github.event.release.tag_name }} build -Pvector-db-provider=chroma -PjarBaseName=robert-openai-chroma | |
ARTIFACT_PATH=$(./gradlew -q printArtifactPath -PjarBaseName=robert-openai-chroma) | |
echo "Uploading $(basename $ARTIFACT_PATH) to release ${{ github.event.release.tag_name }}" | |
gh release upload "${{ github.event.release.tag_name }}" "$ARTIFACT_PATH" --clobber | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Publish package, target Chroma vector store and leverage Ollama for model interaction | |
run: | | |
./gradlew clean setVersion -PnewVersion=${{ github.event.release.tag_name }} build -Pvector-db-provider=chroma -Pmodel-api-provider=ollama -PjarBaseName=robert-ollama-chroma | |
ARTIFACT_PATH=$(./gradlew -q printArtifactPath -PjarBaseName=robert-ollama-chroma) | |
echo "Uploading $(basename $ARTIFACT_PATH) to release ${{ github.event.release.tag_name }}" | |
gh release upload "${{ github.event.release.tag_name }}" "$ARTIFACT_PATH" --clobber | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Publish package, target PgVector vector store and leverage OpenAI API for model interaction | |
run: | | |
./gradlew clean setVersion -PnewVersion=${{ github.event.release.tag_name }} build -Pvector-db-provider=pgvector -PjarBaseName=robert-openai-pgvector | |
ARTIFACT_PATH=$(./gradlew -q printArtifactPath -PjarBaseName=robert-openai-pgvector) | |
echo "Uploading $(basename $ARTIFACT_PATH) to release ${{ github.event.release.tag_name }}" | |
gh release upload "${{ github.event.release.tag_name }}" "$ARTIFACT_PATH" --clobber | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Publish package, target PgVector vector store and leverage Ollama for model interaction | |
run: | | |
./gradlew clean setVersion -PnewVersion=${{ github.event.release.tag_name }} build -Pvector-db-provider=pgvector -Pmodel-api-provider=ollama -PjarBaseName=robert-ollama-pgvector | |
ARTIFACT_PATH=$(./gradlew -q printArtifactPath -PjarBaseName=robert-ollama-pgvector) | |
echo "Uploading $(basename $ARTIFACT_PATH) to release ${{ github.event.release.tag_name }}" | |
gh release upload "${{ github.event.release.tag_name }}" "$ARTIFACT_PATH" --clobber | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |