Skip to content

Commit 3694546

Browse files
committed
Gate releases on Maven publication
Expose Maven publication success from the reusable Java workflow so documentation deployment failures do not suppress the shared SDK release. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 01a9d0e3-0073-48f2-afae-de0398986669
1 parent 9f5374f commit 3694546

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

.github/workflows/java-publish-maven.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ on:
3737
type: boolean
3838
required: false
3939
default: false
40+
outputs:
41+
mavenPublished:
42+
description: "Whether the Java package was published to Maven Central"
43+
value: ${{ jobs.publish-maven.outputs.published }}
4044
secrets:
4145
JAVA_RELEASE_TOKEN:
4246
required: true
@@ -90,6 +94,7 @@ jobs:
9094
working-directory: ./java
9195
outputs:
9296
version: ${{ steps.versions.outputs.release_version }}
97+
published: ${{ steps.publish-maven.outcome == 'success' }}
9398
steps:
9499
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
95100
with:
@@ -194,6 +199,7 @@ jobs:
194199
JAVA_GPG_PASSPHRASE: ${{ secrets.JAVA_GPG_PASSPHRASE }}
195200

196201
- name: Perform Release and Deploy to Maven Central
202+
id: publish-maven
197203
working-directory: ./java
198204
run: |
199205
mvn -B release:perform \

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ jobs:
380380
needs.publish-dotnet.result == 'success' &&
381381
needs.publish-python.result == 'success' &&
382382
needs.publish-rust.result == 'success' &&
383-
needs.publish-java.result == 'success'
383+
needs.publish-java.outputs.mavenPublished == 'true'
384384
runs-on: ubuntu-latest
385385
permissions:
386386
actions: write

0 commit comments

Comments
 (0)