Skip to content

Commit

Permalink
Merge pull request #1088 from luncj/build/fix-release-note
Browse files Browse the repository at this point in the history
build: fix generating release note
  • Loading branch information
nilo19 authored Jan 30, 2022
2 parents b41977b + 398c4f7 commit 6c818cc
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 @@ -164,20 +164,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 @@ -197,4 +199,4 @@ jobs:
files: |
./artifacts/cloud-node-manager-*-*/*
./artifacts/cloud-controller-manager-*-*/*
./artifacts/acr-credential-provider-*-*/*
./artifacts/acr-credential-provider-*-*/*

0 comments on commit 6c818cc

Please sign in to comment.