|
39 | 39 | export PLATFORM_MATRIX=$(jq 'map( |
40 | 40 | select(.PACKAGE_MANAGERS != null and (.PACKAGE_MANAGERS | contains(["maven"]))) |
41 | 41 | | .RUNNER = ( |
42 | | - if (.RUNNER | type == "array") |
43 | | - then (.RUNNER | map(if . == "ephemeral" then "persistent" else . end)) |
44 | | - else (if .RUNNER == "ephemeral" then "persistent" else .RUNNER end) |
| 42 | + if (.RUNNER | type == "array") |
| 43 | + then (.RUNNER | map(if . == "ephemeral" then "persistent" else . end)) |
| 44 | + else (if .RUNNER == "ephemeral" then "persistent" else .RUNNER end) |
45 | 45 | end |
46 | 46 | ) |
47 | 47 | )' < .github/json_matrices/build-matrix.json | jq -c .) |
@@ -129,45 +129,77 @@ jobs: |
129 | 129 | ${{ runner.os }}-gradle-cd- |
130 | 130 | ${{ runner.os }}-gradle- |
131 | 131 |
|
132 | | - - name: Create secret key ring file |
| 132 | + - name: Create secret key ring file for all Java submodules |
133 | 133 | working-directory: java/client |
134 | 134 | run: | |
| 135 | + # Decode the provided base64 GPG key into the client module |
135 | 136 | echo "$SECRING_GPG" | base64 --decode > ./secring.gpg |
136 | | - ls -ltr |
| 137 | +
|
| 138 | + # Copy the key ring file into the jedis-compatibility module which also performs signing |
| 139 | + if [ -d ../jedis-compatibility ]; then |
| 140 | + cp ./secring.gpg ../jedis-compatibility/secring.gpg |
| 141 | + else |
| 142 | + echo "jedis-compatibility module directory not found" >&2 |
| 143 | + exit 1 |
| 144 | + fi |
| 145 | +
|
| 146 | + echo "Listing key ring files to verify presence:" |
| 147 | + ls -l ./secring.gpg ../jedis-compatibility/secring.gpg |
137 | 148 | env: |
138 | 149 | SECRING_GPG: ${{ secrets.SECRING_GPG }} |
139 | 150 |
|
140 | 151 | - name: Build java client |
141 | 152 | working-directory: java |
142 | 153 | run: | |
143 | 154 | if [[ "${{ matrix.host.TARGET }}" == *"musl"* ]]; then |
| 155 | + # Build and publish client first |
144 | 156 | ./gradlew --build-cache :client:publishToMavenLocal -Psigning.secretKeyRingFile=secring.gpg \ |
145 | 157 | -Psigning.password="${{ secrets.GPG_PASSWORD }}" -Psigning.keyId=${{ secrets.GPG_KEY_ID }} \ |
146 | 158 | -Ptarget=${{ matrix.host.TARGET }} |
| 159 | + |
| 160 | + # Then build jedis-compatibility |
| 161 | + ./gradlew --build-cache :jedis-compatibility:publishToMavenLocal -Psigning.secretKeyRingFile=secring.gpg \ |
| 162 | + -Psigning.password="${{ secrets.GPG_PASSWORD }}" -Psigning.keyId=${{ secrets.GPG_KEY_ID }} \ |
| 163 | + -Ptarget=${{ matrix.host.TARGET }} |
147 | 164 | else |
| 165 | + # Build and publish client first |
148 | 166 | ./gradlew --build-cache :client:publishToMavenLocal -Psigning.secretKeyRingFile=secring.gpg \ |
149 | 167 | -Psigning.password="${{ secrets.GPG_PASSWORD }}" -Psigning.keyId=${{ secrets.GPG_KEY_ID }} |
| 168 | + |
| 169 | + # Then build jedis-compatibility |
| 170 | + ./gradlew --build-cache :jedis-compatibility:publishToMavenLocal -Psigning.secretKeyRingFile=secring.gpg \ |
| 171 | + -Psigning.password="${{ secrets.GPG_PASSWORD }}" -Psigning.keyId=${{ secrets.GPG_KEY_ID }} |
150 | 172 | fi |
151 | 173 | env: |
152 | 174 | GLIDE_RELEASE_VERSION: ${{ env.RELEASE_VERSION }} |
153 | 175 |
|
154 | 176 | - name: Bundle JAR |
155 | 177 | working-directory: java |
156 | 178 | run: | |
| 179 | + # Bundle client JAR |
157 | 180 | src_folder=~/.m2/repository/io/valkey/valkey-glide/${{ env.RELEASE_VERSION }} |
158 | 181 | cd $src_folder |
159 | 182 | jar -cvf bundle.jar * |
160 | 183 | ls -ltr |
161 | 184 | cd - |
162 | 185 | cp $src_folder/bundle.jar bundle-${{ matrix.host.TARGET }}.jar |
163 | 186 |
|
| 187 | + # Bundle jedis-compatibility JAR |
| 188 | + jedis_src_folder=~/.m2/repository/io/valkey/valkey-glide-jedis-compatibility/${{ env.RELEASE_VERSION }} |
| 189 | + cd $jedis_src_folder |
| 190 | + jar -cvf jedis-bundle.jar * |
| 191 | + ls -ltr |
| 192 | + cd - |
| 193 | + cp $jedis_src_folder/jedis-bundle.jar jedis-bundle-${{ matrix.host.TARGET }}.jar |
| 194 | +
|
164 | 195 | - name: Upload artifacts to publish |
165 | 196 | continue-on-error: true |
166 | 197 | uses: actions/upload-artifact@v4 |
167 | 198 | with: |
168 | 199 | name: java-${{ matrix.host.TARGET }} |
169 | 200 | path: | |
170 | 201 | java/bundle*.jar |
| 202 | + java/jedis-bundle*.jar |
171 | 203 |
|
172 | 204 | publish-to-maven-central-deployment: |
173 | 205 | if: ${{ inputs.maven_publish == true || github.event_name == 'push' }} |
@@ -196,8 +228,16 @@ jobs: |
196 | 228 | - name: Move files to the correct directory tree |
197 | 229 | run: | |
198 | 230 | mkdir -p build/io/valkey/valkey-glide/${{ env.RELEASE_VERSION }} |
199 | | - cp -a maven-files/* build/io/valkey/valkey-glide/${{ env.RELEASE_VERSION }} |
| 231 | + mkdir -p build/io/valkey/valkey-glide-jedis-compatibility/${{ env.RELEASE_VERSION }} |
| 232 | +
|
| 233 | + # Move jedis-compatibility files first |
| 234 | + cp -a maven-files/valkey-glide-jedis-compatibility* build/io/valkey/valkey-glide-jedis-compatibility/${{ env.RELEASE_VERSION }} |
| 235 | +
|
| 236 | + # Move client files (exclude jedis-compatibility files) |
| 237 | + find maven-files -name "valkey-glide-*" ! -name "*jedis-compatibility*" -exec cp {} build/io/valkey/valkey-glide/${{ env.RELEASE_VERSION }}/ \; |
| 238 | +
|
200 | 239 | rm -rf build/io/valkey/valkey-glide/${{ env.RELEASE_VERSION }}/META-INF |
| 240 | + rm -rf build/io/valkey/valkey-glide-jedis-compatibility/${{ env.RELEASE_VERSION }}/META-INF |
201 | 241 | cd build |
202 | 242 | zip -r ../build io |
203 | 243 |
|
@@ -253,6 +293,9 @@ jobs: |
253 | 293 | fail-fast: false |
254 | 294 | matrix: |
255 | 295 | host: ${{ fromJson(needs.load-platform-matrix.outputs.PLATFORM_MATRIX) }} |
| 296 | + exclude: |
| 297 | + - host: |
| 298 | + TARGET: aarch64-unknown-linux-musl |
256 | 299 | runs-on: ${{ matrix.host.test-runner || matrix.host.runner }} |
257 | 300 | container: |
258 | 301 | image: ${{ matrix.host.IMAGE || ''}} |
|
0 commit comments