diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3236b440e..ec3a7a940 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -268,3 +268,18 @@ jobs: gpg --batch --import private-key.gpg ./mvnw -V -B -Dgpg.skip=false -DskipTests -s settings.xml deploy curl -X POST https://ossrh-staging-api.central.sonatype.com/manual/upload/defaultRepository/io.dapr + + # Opens (or comments on) a tracking issue only when the publish job (Maven + # Central deploy) fails. Build/test failures skip publish, so failure() stays + # false and CI flakes don't open issues. + notify-on-failure: + needs: [publish] + if: failure() && startsWith(github.ref, 'refs/tags/v') + permissions: + issues: write + actions: read + uses: dapr/.github/.github/workflows/open-issue-on-failure.yml@main + with: + title: "Release workflow failed: ${{ github.workflow }} (${{ github.ref_name }})" + labels: "release,ci/release-failure" + mention: "@dapr/maintainers-java-sdk @dapr/approvers-java-sdk"