Skip to content

Commit f3aeb78

Browse files
authored
ci: fix release-please manifest tag handling (#879)
1 parent 8f93226 commit f3aeb78

2 files changed

Lines changed: 13 additions & 2 deletions

File tree

.github/workflows/release-please.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,21 @@ jobs:
3434

3535
- name: Normalize release PR pyproject prerelease version
3636
if: ${{ steps.release.outputs.prs_created == 'true' }}
37-
env:
38-
RELEASE_PR_BRANCH: release-please--branches--${{ github.ref_name }}
3937
run: |
4038
set -euo pipefail
4139
40+
BASE_RELEASE_PR_BRANCH="release-please--branches--${{ github.ref_name }}"
41+
COMPONENT_RELEASE_PR_BRANCH="${BASE_RELEASE_PR_BRANCH}--components--adcp"
42+
43+
if git ls-remote --exit-code --heads origin "${COMPONENT_RELEASE_PR_BRANCH}" >/dev/null 2>&1; then
44+
RELEASE_PR_BRANCH="${COMPONENT_RELEASE_PR_BRANCH}"
45+
elif git ls-remote --exit-code --heads origin "${BASE_RELEASE_PR_BRANCH}" >/dev/null 2>&1; then
46+
RELEASE_PR_BRANCH="${BASE_RELEASE_PR_BRANCH}"
47+
else
48+
echo "No release PR branch found to normalize"
49+
exit 0
50+
fi
51+
4252
git fetch origin "${RELEASE_PR_BRANCH}:${RELEASE_PR_BRANCH}"
4353
git switch "${RELEASE_PR_BRANCH}"
4454

release-please-config.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"changelog-path": "CHANGELOG.md",
77
"bump-minor-pre-major": true,
88
"bump-patch-for-minor-pre-major": false,
9+
"include-component-in-tag": false,
910
"versioning": "prerelease",
1011
"prerelease": true,
1112
"prerelease-type": "beta"

0 commit comments

Comments
 (0)