java-sdk/.github/workflows/maven-central-release.yml
Christian Tzolov 12fd8e51f3 refactor: rename artifacts and restructure modules
- Rename spring-ai-mcp-core to mcp for simpler artifact naming
- Rename spring-ai-mcp-spring to spring-ai-mcp for clarity
- Rename parent artifact from spring-ai-mcp to mcp-parent
- Update artifact references in pom files and documentation
- Update directory structure and paths in GitHub workflow

Resolves #31

chore: improve module descriptions and update dependencies

- Update parent pom description to better reflect overall project scope
- Update mcp module description to detail core Java SDK capabilities
- Update spring-ai-mcp module description to emphasize Spring integration features
- Update dependency versions to stable releases:
  * JUnit: 5.11.3 -> 5.10.2
  * Jackson: 2.18.2 -> 2.17.0
2024-12-21 16:30:19 +01:00

62 lines
No EOL
3.3 KiB
YAML

name: Maven Central Release
on:
workflow_dispatch:
inputs:
releaseVersion:
description: "Release version"
required: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Capture release version
run: echo RELEASE_VERSION=${{ github.event.inputs.releaseVersion }} >> $GITHUB_ENV
- name: Prepare directory structure
run: |
mkdir -p nexus/org/springframework/experimental/mcp-parent/$RELEASE_VERSION
mkdir -p nexus/org/springframework/experimental/mcp/$RELEASE_VERSION
mkdir -p nexus/org/springframework/experimental/spring-ai-mcp/$RELEASE_VERSION
- name: Download release files from Artifactory
env:
ARTIFACTORY_URL: "https://repo.spring.io/libs-staging-local/org/springframework/experimental"
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
run: |
echo "Downloading parent POM artifacts"
cd nexus/org/springframework/experimental/spring-ai-mcp/$RELEASE_VERSION
wget --user="$ARTIFACTORY_USERNAME" --password="$ARTIFACTORY_PASSWORD" $ARTIFACTORY_URL/spring-ai-mcp/$RELEASE_VERSION/spring-ai-mcp-$RELEASE_VERSION.pom
echo "Downloading core artifacts"
cd ../../../../../..
cd nexus/org/springframework/experimental/mcp/$RELEASE_VERSION
wget --user="$ARTIFACTORY_USERNAME" --password="$ARTIFACTORY_PASSWORD" $ARTIFACTORY_URL/mcp/$RELEASE_VERSION/mcp-$RELEASE_VERSION.pom
wget --user="$ARTIFACTORY_USERNAME" --password="$ARTIFACTORY_PASSWORD" $ARTIFACTORY_URL/mcp/$RELEASE_VERSION/mcp-$RELEASE_VERSION.jar
wget --user="$ARTIFACTORY_USERNAME" --password="$ARTIFACTORY_PASSWORD" $ARTIFACTORY_URL/mcp/$RELEASE_VERSION/mcp-$RELEASE_VERSION-javadoc.jar
wget --user="$ARTIFACTORY_USERNAME" --password="$ARTIFACTORY_PASSWORD" $ARTIFACTORY_URL/mcp/$RELEASE_VERSION/mcp-$RELEASE_VERSION-sources.jar
echo "Downloading spring artifacts"
cd ../../../../../..
cd nexus/org/springframework/experimental/spring-ai-mcp/$RELEASE_VERSION
wget --user="$ARTIFACTORY_USERNAME" --password="$ARTIFACTORY_PASSWORD" $ARTIFACTORY_URL/spring-ai-mcp/$RELEASE_VERSION/spring-ai-mcp-$RELEASE_VERSION.pom
wget --user="$ARTIFACTORY_USERNAME" --password="$ARTIFACTORY_PASSWORD" $ARTIFACTORY_URL/spring-ai-mcp/$RELEASE_VERSION/spring-ai-mcp-$RELEASE_VERSION.jar
wget --user="$ARTIFACTORY_USERNAME" --password="$ARTIFACTORY_PASSWORD" $ARTIFACTORY_URL/spring-ai-mcp/$RELEASE_VERSION/spring-ai-mcp-$RELEASE_VERSION-javadoc.jar
wget --user="$ARTIFACTORY_USERNAME" --password="$ARTIFACTORY_PASSWORD" $ARTIFACTORY_URL/spring-ai-mcp/$RELEASE_VERSION/spring-ai-mcp-$RELEASE_VERSION-sources.jar
- name: Sign artifacts and release them to Maven Central
uses: spring-io/nexus-sync-action@main
id: nexus
with:
url: ${{ secrets.OSSRH_URL }}
username: ${{ secrets.OSSRH_S01_TOKEN_USERNAME }}
password: ${{ secrets.OSSRH_S01_TOKEN_PASSWORD }}
staging-profile-name: ${{ secrets.OSSRH_STAGING_PROFILE_NAME }}
create: true
upload: true
close: true
release: true
generate-checksums: true