Files
langchain4j--langchain4j/.github/workflows/update-versions-next-dev-iteration.yaml
wehub-resource-sync a2578d7ff1
snapshot_release / snapshot_release (push) Has been cancelled
Documentation: build and deploy / deploy (push) Has been cancelled
langchain4j-github-bot.yml lint / langchain4j-github-bot.yml validation (push) Has been cancelled
Java CI / compile_and_unit_test (17) (push) Has been cancelled
Java CI / compile_and_unit_test (21) (push) Has been cancelled
Java CI / compile_and_unit_test (25) (push) Has been cancelled
Split Package Detection / check-split-packages (push) Has been cancelled
Java CI / integration_test (21) (push) Has been cancelled
Java CI / compliance (push) Has been cancelled
Java CI / spotless (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 13:38:45 +08:00

105 lines
3.6 KiB
YAML

name: Update versions for next dev iteration
on:
repository_dispatch:
types: [ trigger-update-versions-next-dev-iteration ]
workflow_dispatch:
inputs:
nextStableVersion:
description: "Next stable SNAPSHOT version (e.g., 1.9.0-SNAPSHOT)"
required: true
nextBetaVersion:
description: "Next beta SNAPSHOT version (e.g., 1.9.0-beta16-SNAPSHOT)"
required: true
env:
NEXT_STABLE_VERSION: ${{ github.event.inputs.nextStableVersion || github.event.client_payload.nextStableVersion }}
NEXT_BETA_VERSION: ${{ github.event.inputs.nextBetaVersion || github.event.client_payload.nextBetaVersion }}
permissions:
contents: write
concurrency:
group: update-versions
cancel-in-progress: false
jobs:
update_versions:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
with:
fetch-depth: 0
token: ${{ secrets.GH_RELEASE_AUTOMATION }}
- name: Set up JDK 25
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5
with:
java-version: '25'
distribution: 'temurin'
cache: maven
- name: Show inputs
run: |
echo "Next stable version: $NEXT_STABLE_VERSION"
echo "Next beta version: $NEXT_BETA_VERSION"
- name: Extract current stable version property
id: extract-current-stable
run: |
REVISION=$(mvn help:evaluate -Dexpression=langchain4j.stable.version -q -DforceStdout)
echo "currentStableVersion=$REVISION" >> $GITHUB_OUTPUT
- name: Extract current beta version property
id: extract-current-beta
run: |
REVISION=$(mvn help:evaluate -Dexpression=langchain4j.beta.version -q -DforceStdout)
echo "currentBetaVersion=$REVISION" >> $GITHUB_OUTPUT
- name: Update stable versions
run: |
mvn versions:set \
-DnewVersion="$NEXT_STABLE_VERSION" \
-DoldVersion=${{ steps.extract-current-stable.outputs.currentStableVersion }} \
-DgroupId=* -DartifactId=* -DgenerateBackupPoms=false
- name: Update stable version property
run: |
mvn versions:set-property \
-Dproperty=langchain4j.stable.version \
-DnewVersion="$NEXT_STABLE_VERSION" \
-DgenerateBackupPoms=false
- name: Update beta versions
run: |
mvn versions:set \
-DnewVersion="$NEXT_BETA_VERSION" \
-DoldVersion=${{ steps.extract-current-beta.outputs.currentBetaVersion }} \
-DgroupId=* -DartifactId=* -DgenerateBackupPoms=false
- name: Update beta version property
run: |
mvn versions:set-property \
-Dproperty=langchain4j.beta.version \
-DnewVersion="$NEXT_BETA_VERSION" \
-DgenerateBackupPoms=false
- name: Commit and push changes
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add pom.xml '**/pom.xml'
git commit -m "Update versions to $NEXT_STABLE_VERSION and $NEXT_BETA_VERSION"
git push origin main
- name: Trigger the same job in the langchain4j-spring repo
env:
GH_TOKEN: ${{ secrets.GH_RELEASE_AUTOMATION }}
run: |
gh api repos/langchain4j/langchain4j-spring/dispatches \
-f event_type=trigger-update-versions-next-dev-iteration \
-f "client_payload[nextStableVersion]=$NEXT_STABLE_VERSION" \
-f "client_payload[nextBetaVersion]=$NEXT_BETA_VERSION"