Skip to content

Commit a459377

Browse files
committed
chore(java-cloud-bom): support libraries-bom/v tag format in release note workflow
1 parent 1309124 commit a459377

1 file changed

Lines changed: 4 additions & 7 deletions

File tree

.github/workflows/java-cloud-bom-release-note-generation.yaml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,10 @@ jobs:
4848
if [ -n "${WORKFLOW_DISPATCH_INPUT}" ]; then
4949
echo "WORKFLOW_DISPATCH_INPUT: ${WORKFLOW_DISPATCH_INPUT}"
5050
echo "libraries-bom-version=${WORKFLOW_DISPATCH_INPUT}" >> $GITHUB_OUTPUT
51-
elif [[ "${GITHUB_REF}" == *"refs/tags/v"* ]]; then
52-
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#release
53-
# Example value of GITHUB_REF: refs/tags/v26.5.0
54-
# With the single-component setup of Release Please, the Libraries BOM
55-
# version is the version of this repository release.
51+
elif [[ "${GITHUB_REF}" == *"refs/tags/"* ]]; then
52+
# Example value of GITHUB_REF: refs/tags/libraries-bom/v26.5.0
5653
echo "GITHUB_REF: ${GITHUB_REF}"
57-
VERSION=${GITHUB_REF#refs/*/v}
54+
VERSION=${GITHUB_REF#*v}
5855
echo "libraries-bom-version=${VERSION}" >> $GITHUB_OUTPUT
5956
else
6057
echo "Couldn't find the Libraries BOM version. WORKFLOW_DISPATCH_INPUT \
@@ -85,7 +82,7 @@ jobs:
8582
GH_TOKEN: ${{ github.token }}
8683
- name: Update the release note with release_note.md
8784
run: |
88-
TAG="v${LIBRARIES_BOM_VERSION}"
85+
TAG="libraries-bom/v${LIBRARIES_BOM_VERSION}"
8986
echo "Updating ${TAG}"
9087
gh release edit "${TAG}" --notes-file release_note.md
9188
working-directory: java-cloud-bom/release-note-generation

0 commit comments

Comments
 (0)