|
32 | 32 | - name: Update Maven version
|
33 | 33 | run: mvn versions:set -DnewVersion=${{ steps.get_version.outputs.VERSION }}
|
34 | 34 |
|
35 |
| - # Build all modules with the 'publication' profile |
36 |
| - - name: Build project |
37 |
| - run: mvn -Ppublication clean package -DskipTests |
| 35 | + # Build and install all modules with the 'publication' profile |
| 36 | + - name: Build and install project |
| 37 | + run: mvn -Ppublication clean install -DskipTests |
| 38 | + |
| 39 | + # Stage artifacts for deployment (similar to snapshot workflow) |
| 40 | + - name: Stage artifacts for JReleaser |
| 41 | + run: | |
| 42 | + # Create staging directory |
| 43 | + mkdir -p target/staging-deploy |
| 44 | + |
| 45 | + # Copy parent POM to staging directory |
| 46 | + mkdir -p target/staging-deploy/com/redis/om/redis-om-spring-parent/${{ steps.get_version.outputs.VERSION }} |
| 47 | + cp pom.xml \ |
| 48 | + target/staging-deploy/com/redis/om/redis-om-spring-parent/${{ steps.get_version.outputs.VERSION }}/redis-om-spring-parent-${{ steps.get_version.outputs.VERSION }}.pom |
| 49 | + |
| 50 | + # Copy the artifacts for both modules to the staging directory |
| 51 | + # redis-om-spring module |
| 52 | + mkdir -p target/staging-deploy/com/redis/om/redis-om-spring/${{ steps.get_version.outputs.VERSION }} |
| 53 | + cp redis-om-spring/target/redis-om-spring-${{ steps.get_version.outputs.VERSION }}.jar \ |
| 54 | + target/staging-deploy/com/redis/om/redis-om-spring/${{ steps.get_version.outputs.VERSION }}/ |
| 55 | + cp redis-om-spring/target/redis-om-spring-${{ steps.get_version.outputs.VERSION }}-sources.jar \ |
| 56 | + target/staging-deploy/com/redis/om/redis-om-spring/${{ steps.get_version.outputs.VERSION }}/ |
| 57 | + cp redis-om-spring/target/redis-om-spring-${{ steps.get_version.outputs.VERSION }}-javadoc.jar \ |
| 58 | + target/staging-deploy/com/redis/om/redis-om-spring/${{ steps.get_version.outputs.VERSION }}/ |
| 59 | + cp redis-om-spring/pom.xml \ |
| 60 | + target/staging-deploy/com/redis/om/redis-om-spring/${{ steps.get_version.outputs.VERSION }}/redis-om-spring-${{ steps.get_version.outputs.VERSION }}.pom |
| 61 | + |
| 62 | + # redis-om-spring-ai module |
| 63 | + mkdir -p target/staging-deploy/com/redis/om/redis-om-spring-ai/${{ steps.get_version.outputs.VERSION }} |
| 64 | + cp redis-om-spring-ai/target/redis-om-spring-ai-${{ steps.get_version.outputs.VERSION }}.jar \ |
| 65 | + target/staging-deploy/com/redis/om/redis-om-spring-ai/${{ steps.get_version.outputs.VERSION }}/ |
| 66 | + cp redis-om-spring-ai/target/redis-om-spring-ai-${{ steps.get_version.outputs.VERSION }}-sources.jar \ |
| 67 | + target/staging-deploy/com/redis/om/redis-om-spring-ai/${{ steps.get_version.outputs.VERSION }}/ |
| 68 | + cp redis-om-spring-ai/target/redis-om-spring-ai-${{ steps.get_version.outputs.VERSION }}-javadoc.jar \ |
| 69 | + target/staging-deploy/com/redis/om/redis-om-spring-ai/${{ steps.get_version.outputs.VERSION }}/ |
| 70 | + cp redis-om-spring-ai/pom.xml \ |
| 71 | + target/staging-deploy/com/redis/om/redis-om-spring-ai/${{ steps.get_version.outputs.VERSION }}/redis-om-spring-ai-${{ steps.get_version.outputs.VERSION }}.pom |
| 72 | + |
| 73 | + # List staged artifacts for verification |
| 74 | + echo "Staged artifacts:" |
| 75 | + find target/staging-deploy -type f | sort |
38 | 76 |
|
39 | 77 | # Deploy with JReleaser which handles signing and publishing to Maven Central
|
40 | 78 | - name: Release with JReleaser
|
|
57 | 95 | JRELEASER_SIGNING_ENABLED: true
|
58 | 96 | JRELEASER_SIGNING_ACTIVE: ALWAYS
|
59 | 97 |
|
60 |
| - # Maven Central publishing configuration |
61 |
| - JRELEASER_MAVENCENTRAL_USERNAME: ${{ secrets.SONATYPE_USERNAME }} |
62 |
| - JRELEASER_MAVENCENTRAL_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} |
| 98 | + # Maven Central publishing configuration |
| 99 | + JRELEASER_DEPLOY_MAVEN_NEXUS2_MAVEN_CENTRAL_USERNAME: ${{ secrets.SONATYPE_USERNAME }} |
| 100 | + JRELEASER_DEPLOY_MAVEN_NEXUS2_MAVEN_CENTRAL_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} |
63 | 101 |
|
64 | 102 | # Debug mode for more verbose output
|
65 | 103 | JRELEASER_DEBUG: true
|
|
0 commit comments