Browse Source

fix(workflows): incorrect target sha when tagging in release

pull/3727/head
Wing-Kam Wong 2 years ago
parent
commit
3361f23522
  1. 4
      .github/workflows/release-draft.yml

4
.github/workflows/release-draft.yml

@ -49,9 +49,9 @@ jobs:
# the SHA from the third commit (i.e. Auto PR from master to develop) will be taken
# else HEAD will be taken
run: |
TARGET_SHA=$(git rev-parse HEAD~2)
TARGET_SHA=$(git rev-list -n 3 HEAD | tail -1)
if [[ ${{ github.event.inputs.tagHeadSHA || inputs.tagHeadSHA }} == "Y" ]]; then
TARGET_SHA=$(git rev-parse HEAD)
TARGET_SHA=$(git rev-list -n 1 HEAD | tail -1)
fi
echo "::set-output name=TARGET_SHA::${TARGET_SHA}"
echo "Setting TARGET_SHA: ${TARGET_SHA}"

Loading…
Cancel
Save