From bf547650f12e7cb4f5a306651d133a1b76e69d0a Mon Sep 17 00:00:00 2001 From: David Mihalcik Date: Thu, 17 Apr 2025 17:02:50 -0400 Subject: [PATCH] chore(ci): Autobump java-sdk on protocol buffer changes --- .github/workflows/release.yaml | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index c4b3cf7ee..fa7ddecac 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -64,7 +64,7 @@ jobs: RELEASED_PATHS: ${{ steps.release-please.outputs.paths_released }} update-go-mods: runs-on: ubuntu-latest - needs: + needs: - release-please if: fromJSON(needs.release-please.outputs.releases_created) && fromJSON(needs.release-please.outputs.to_update) strategy: @@ -122,3 +122,22 @@ jobs: gh pr merge --auto --squash env: GITHUB_TOKEN: "${{ steps.generate_token.outputs.token }}" + + bump-java-sdk: + runs-on: ubuntu-latest + needs: + - release-please + if: fromJSON(needs.release-please.outputs.releases_created) && contains(fromJSON(needs.release-please.outputs.paths_released), 'protocol/go') + steps: + - name: Lookup version of protocol/go + id: version + run: | + echo "PROTO_VERSION=$(jq -r '.["protocol/go"]' <"${GITHUB_WORKSPACE}"/.release-please-manifest.json)" >> $GITHUB_OUTPUT + + - name: Dispatch Java SDK Release + uses: peter-evans/repository-dispatch@v3 + with: + token: ${{ secrets.JAVA_SDK_DISPATCH_PAT }} + repository: opentdf/java-sdk + event-type: update-platform-branch.yaml + client-payload: '{"tag": "protocol/go/v${{ steps.version.PROTO_VERSION }}"}'