Skip to content

Deploy Snapshots

Deploy Snapshots #46

# This workflow will build a Java / Kotlin project with Maven
name: Deploy Snapshots
on:
workflow_dispatch: # Enables manual triggering
workflow_run:
workflows: ["Build"]
types:
- completed
branches:
- main
jobs:
build-and-deploy:
runs-on: ubuntu-latest
if: github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success'
steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
cache: maven
- name: Configure Maven Settings
uses: s4u/maven-settings-action@v2.8.0
with:
servers: ${{secrets.EMBABEL_ARTIFACTORY}}
- name: Build and analyze
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: mvn -P enable-agent-a2a-server-uber -DskipTests=true clean deploy
- name: Trigger acceptance repo workflow
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.PAT_TOKEN }}
repository: embabel/embabel-acceptance-tests
event-type: examples-snapshots-deployed