1+ name : Maven Central Release
2+
3+ on :
4+ workflow_dispatch :
5+ inputs :
6+ releaseVersion :
7+ description : " Release version"
8+ required : true
9+
10+ jobs :
11+ build :
12+ runs-on : ubuntu-latest
13+ steps :
14+
15+ - name : Capture release version
16+ run : echo RELEASE_VERSION=${{ github.event.inputs.releaseVersion }} >> $GITHUB_ENV
17+
18+ - name : Prepare directory structure
19+ run : |
20+ mkdir -p nexus/org/springframework/experimental/spring-ai-mcp/$RELEASE_VERSION
21+ mkdir -p nexus/org/springframework/experimental/spring-ai-mcp-core/$RELEASE_VERSION
22+ mkdir -p nexus/org/springframework/experimental/spring-ai-mcp-spring/$RELEASE_VERSION
23+
24+ - name : Download release files from Artifactory
25+ env :
26+ ARTIFACTORY_URL : " https://repo.spring.io/libs-staging-local/org/springframework/experimental"
27+ ARTIFACTORY_USERNAME : ${{ secrets.ARTIFACTORY_USERNAME }}
28+ ARTIFACTORY_PASSWORD : ${{ secrets.ARTIFACTORY_PASSWORD }}
29+ run : |
30+ echo "Downloading parent POM artifacts"
31+ cd nexus/org/springframework/experimental/spring-ai-mcp/$RELEASE_VERSION
32+ wget --user="$ARTIFACTORY_USERNAME" --password="$ARTIFACTORY_PASSWORD" $ARTIFACTORY_URL/spring-ai-mcp/$RELEASE_VERSION/spring-ai-mcp-$RELEASE_VERSION.pom
33+
34+ echo "Downloading core artifacts"
35+ cd ../../../../../..
36+ cd nexus/org/springframework/experimental/spring-ai-mcp-core/$RELEASE_VERSION
37+ wget --user="$ARTIFACTORY_USERNAME" --password="$ARTIFACTORY_PASSWORD" $ARTIFACTORY_URL/spring-ai-mcp-core/$RELEASE_VERSION/spring-ai-mcp-core-$RELEASE_VERSION.pom
38+ wget --user="$ARTIFACTORY_USERNAME" --password="$ARTIFACTORY_PASSWORD" $ARTIFACTORY_URL/spring-ai-mcp-core/$RELEASE_VERSION/spring-ai-mcp-core-$RELEASE_VERSION.jar
39+ wget --user="$ARTIFACTORY_USERNAME" --password="$ARTIFACTORY_PASSWORD" $ARTIFACTORY_URL/spring-ai-mcp-core/$RELEASE_VERSION/spring-ai-mcp-core-$RELEASE_VERSION-javadoc.jar
40+ wget --user="$ARTIFACTORY_USERNAME" --password="$ARTIFACTORY_PASSWORD" $ARTIFACTORY_URL/spring-ai-mcp-core/$RELEASE_VERSION/spring-ai-mcp-core-$RELEASE_VERSION-sources.jar
41+
42+ echo "Downloading spring artifacts"
43+ cd ../../../../../..
44+ cd nexus/org/springframework/experimental/spring-ai-mcp-spring/$RELEASE_VERSION
45+ wget --user="$ARTIFACTORY_USERNAME" --password="$ARTIFACTORY_PASSWORD" $ARTIFACTORY_URL/spring-ai-mcp-spring/$RELEASE_VERSION/spring-ai-mcp-spring-$RELEASE_VERSION.pom
46+ wget --user="$ARTIFACTORY_USERNAME" --password="$ARTIFACTORY_PASSWORD" $ARTIFACTORY_URL/spring-ai-mcp-spring/$RELEASE_VERSION/spring-ai-mcp-spring-$RELEASE_VERSION.jar
47+ wget --user="$ARTIFACTORY_USERNAME" --password="$ARTIFACTORY_PASSWORD" $ARTIFACTORY_URL/spring-ai-mcp-spring/$RELEASE_VERSION/spring-ai-mcp-spring-$RELEASE_VERSION-javadoc.jar
48+ wget --user="$ARTIFACTORY_USERNAME" --password="$ARTIFACTORY_PASSWORD" $ARTIFACTORY_URL/spring-ai-mcp-spring/$RELEASE_VERSION/spring-ai-mcp-spring-$RELEASE_VERSION-sources.jar
49+
50+ - name : Sign artifacts and release them to Maven Central
51+ uses : spring-io/nexus-sync-action@main
52+ id : nexus
53+ with :
54+ url : ${{ secrets.OSSRH_URL }}
55+ username : ${{ secrets.OSSRH_S01_TOKEN_USERNAME }}
56+ password : ${{ secrets.OSSRH_S01_TOKEN_PASSWORD }}
57+ staging-profile-name : ${{ secrets.OSSRH_STAGING_PROFILE_NAME }}
58+ create : true
59+ upload : true
60+ close : true
61+ release : true
62+ generate-checksums : true
0 commit comments