Skip to content

Commit

Permalink
Merge pull request #1093 from luncj/pick/1088-to-release-1.1
Browse files Browse the repository at this point in the history
build: fix generating release note
  • Loading branch information
k8s-ci-robot authored Jan 30, 2022
2 parents 31eaef7 + 4b87bad commit 68dc82c
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -115,20 +115,22 @@ jobs:
VERSION_PATCH="${VERSION##*.}"
BRANCH=release-${VERSION_MAJOR}.${VERSION_MINOR}
if [[ ! `git branch --list ${BRANCH}` ]]; then
if [[ ! `git show-ref ${BRANCH}` ]]; then
BRANCH=master
fi
if [[ "${VERSION_PATCH}" = "0" ]]; then
START_SHA=$(git rev-parse v${VERSION_MAJOR}.$((VERSION_MINOR-1)).0)
START_TAG=remotes/origin/release-${VERSION_MAJOR}.$((VERSION_MINOR-1))
else
START_SHA=$(git rev-parse v${VERSION_MAJOR}.${VERSION_MINOR}.$((VERSION_PATCH-1)))
START_TAG=v${VERSION_MAJOR}.${VERSION_MINOR}.$((VERSION_PATCH-1))
fi
END_SHA=$(git rev-parse ${GITHUB_REF_NAME})
START_SHA=$(git rev-parse ${START_TAG})
END_TAG=${GITHUB_REF_NAME}
END_SHA=$(git rev-parse ${END_TAG})
echo ${BRANCH}
echo ${START_SHA}
echo ${END_SHA}
echo "BRANCH=${BRANCH}"
echo "START_TAG=${START_TAG} START_SHA=${START_SHA}"
echo "END_TAG=${END_TAG} END_SHA=${END_SHA}"
GO111MODULE=on go install k8s.io/release/cmd/release-notes@latest
release-notes --repo=cloud-provider-azure \
Expand All @@ -147,4 +149,4 @@ jobs:
body_path: release-note.md
files: |
./artifacts/cloud-node-manager-*-*/*
./artifacts/cloud-controller-manager-*-*/*
./artifacts/cloud-controller-manager-*-*/*

0 comments on commit 68dc82c

Please sign in to comment.