From c0501154c7a0c9ee551e13c26de0c714b24fa04b Mon Sep 17 00:00:00 2001 From: Jin Seop Kim Date: Tue, 30 Jun 2026 18:32:08 -0400 Subject: [PATCH] chore(java-cloud-bom): support libraries-bom/v tag format in release note workflow --- .../java-cloud-bom-release-note-generation.yaml | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/.github/workflows/java-cloud-bom-release-note-generation.yaml b/.github/workflows/java-cloud-bom-release-note-generation.yaml index 529cb53741a1..6e0243126723 100644 --- a/.github/workflows/java-cloud-bom-release-note-generation.yaml +++ b/.github/workflows/java-cloud-bom-release-note-generation.yaml @@ -27,7 +27,7 @@ jobs: - 'java-cloud-bom/**' release-note-generation: needs: filter - if: ${{ needs.filter.outputs.library == 'true' }} + if: ${{ needs.filter.outputs.library == 'true' && (github.event_name == 'workflow_dispatch' || startsWith(github.event.release.tag_name, 'libraries-bom/')) }} runs-on: ubuntu-latest permissions: contents: write @@ -48,13 +48,10 @@ jobs: if [ -n "${WORKFLOW_DISPATCH_INPUT}" ]; then echo "WORKFLOW_DISPATCH_INPUT: ${WORKFLOW_DISPATCH_INPUT}" echo "libraries-bom-version=${WORKFLOW_DISPATCH_INPUT}" >> $GITHUB_OUTPUT - elif [[ "${GITHUB_REF}" == *"refs/tags/v"* ]]; then - # https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#release - # Example value of GITHUB_REF: refs/tags/v26.5.0 - # With the single-component setup of Release Please, the Libraries BOM - # version is the version of this repository release. + elif [[ "${GITHUB_REF}" == *"refs/tags/libraries-bom/v"* ]]; then + # Example value of GITHUB_REF: refs/tags/libraries-bom/v26.5.0 echo "GITHUB_REF: ${GITHUB_REF}" - VERSION=${GITHUB_REF#refs/*/v} + VERSION=${GITHUB_REF#*v} echo "libraries-bom-version=${VERSION}" >> $GITHUB_OUTPUT else echo "Couldn't find the Libraries BOM version. WORKFLOW_DISPATCH_INPUT \ @@ -85,7 +82,7 @@ jobs: GH_TOKEN: ${{ github.token }} - name: Update the release note with release_note.md run: | - TAG="v${LIBRARIES_BOM_VERSION}" + TAG="libraries-bom/v${LIBRARIES_BOM_VERSION}" echo "Updating ${TAG}" gh release edit "${TAG}" --notes-file release_note.md working-directory: java-cloud-bom/release-note-generation