Skip to content

Commit 9fa517c

Browse files
committed
Merge branch '2.0.x'
2 parents a04e913 + ea3d9b4 commit 9fa517c

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

ci/pipeline.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,7 @@ jobs:
392392
image: spring-boot-ci-image
393393
file: git-repo/ci/tasks/publish-release-notes.yml
394394
params:
395+
RELEASE_TYPE: M
395396
GITHUB_ORGANIZATION: spring-projects
396397
GITHUB_REPO: spring-boot
397398
GITHUB_USERNAME: ((github-username))
@@ -402,6 +403,7 @@ jobs:
402403
- get: spring-boot-ci-image
403404
- get: git-repo
404405
trigger: false
406+
- get: release-notes-repo
405407
- task: stage
406408
image: spring-boot-ci-image
407409
file: git-repo/ci/tasks/stage.yml
@@ -418,6 +420,7 @@ jobs:
418420
image: spring-boot-ci-image
419421
file: git-repo/ci/tasks/publish-release-notes.yml
420422
params:
423+
RELEASE_TYPE: RC
421424
GITHUB_ORGANIZATION: spring-projects
422425
GITHUB_REPO: spring-boot
423426
GITHUB_USERNAME: ((github-username))
@@ -428,6 +431,7 @@ jobs:
428431
- get: spring-boot-ci-image
429432
- get: git-repo
430433
trigger: false
434+
- get: release-notes-repo
431435
- task: stage
432436
image: spring-boot-ci-image
433437
file: git-repo/ci/tasks/stage.yml
@@ -444,6 +448,7 @@ jobs:
444448
image: spring-boot-ci-image
445449
file: git-repo/ci/tasks/publish-release-notes.yml
446450
params:
451+
RELEASE_TYPE: RELEASE
447452
GITHUB_ORGANIZATION: spring-projects
448453
GITHUB_REPO: spring-boot
449454
GITHUB_USERNAME: ((github-username))

ci/scripts/publish-release-notes.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ set -e
33

44
source $(dirname $0)/common.sh
55

6-
latest=$( curl -s "https://api.github.com/repos/${GITHUB_ORGANIZATION}/${GITHUB_REPO}/releases/latest" -u ${GITHUB_USERNAME}:${GITHUB_PASSWORD} )
7-
id=$( echo $latest | jq -r '.id' )
8-
96
milestone=$( cat version/stageVersion )
7+
if [[ $RELEASE_TYPE = "RELEASE" ]]; then
8+
milestone=${milestone%.RELEASE}
9+
fi
1010
milestone_number=$( curl -s "https://api.github.com/repos/${GITHUB_ORGANIZATION}/${GITHUB_REPO}/milestones" -u ${GITHUB_USERNAME}:${GITHUB_PASSWORD} | jq -r --arg MILESTONE "${milestone}" '.[] | select(.title == $MILESTONE) | .number')
1111

1212
pushd release-notes-repo > /dev/null
@@ -21,7 +21,7 @@ curl \
2121
-s \
2222
-u ${GITHUB_USERNAME}:${GITHUB_PASSWORD} \
2323
-H "Content-type:application/json" \
24-
-d "{\"body\": \"${body}\"}" \
24+
-d "{\"tag_name\":\"v{$milestone}\",\"name\":\"v{$milestone}\",\"body\": \"${body}\"}" \
2525
-f \
2626
-X \
27-
PATCH "https://api.github.com/repos/${GITHUB_ORGANIZATION}/${GITHUB_REPO}/releases/${id}" > /dev/null || { echo "Failed to publish" >&2; exit 1; }
27+
POST "https://api.github.com/repos/${GITHUB_ORGANIZATION}/${GITHUB_REPO}/releases" > /dev/null || { echo "Failed to publish" >&2; exit 1; }

ci/tasks/publish-release-notes.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@ params:
99
GITHUB_REPO:
1010
GITHUB_USERNAME:
1111
GITHUB_PASSWORD:
12+
RELEASE_TYPE:
1213
run:
1314
path: git-repo/ci/scripts/publish-release-notes.sh

0 commit comments

Comments
 (0)