mirror of
https://github.com/VSCodium/vscodium.git
synced 2024-12-31 12:56:21 +03:00
fix: generate release notes in several steps [skip ci]
This commit is contained in:
parent
c4debee59f
commit
4317f99fc4
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
# shellcheck disable=SC1091
|
||||
|
||||
set -e
|
||||
set -ex
|
||||
|
||||
if [[ -z "${GH_TOKEN}" ]] && [[ -z "${GITHUB_TOKEN}" ]] && [[ -z "${GH_ENTERPRISE_TOKEN}" ]] && [[ -z "${GITHUB_ENTERPRISE_TOKEN}" ]]; then
|
||||
echo "Will not release because no GITHUB_TOKEN defined"
|
||||
@ -21,13 +21,16 @@ if [[ $( gh release view --repo "${ASSETS_REPOSITORY}" "${RELEASE_VERSION}" 2>&1
|
||||
|
||||
gh release create "${RELEASE_VERSION}" --repo "${ASSETS_REPOSITORY}" --title "${RELEASE_VERSION}" --notes "${NOTES}"
|
||||
else
|
||||
gh release create "${RELEASE_VERSION}" --repo "${ASSETS_REPOSITORY}" --title "${RELEASE_VERSION}" --generate-notes
|
||||
|
||||
. ./utils.sh
|
||||
|
||||
replace "s|MS_TAG_SHORT|$( echo "${MS_TAG//./_}" | cut -d'_' -f 1,2 )|" release_notes.txt
|
||||
replace "s|MS_TAG|${MS_TAG}|" release_notes.txt
|
||||
replace "s|RELEASE_VERSION|${RELEASE_VERSION}|" release_notes.txt
|
||||
replace "s|RELEASE_NOTES|$( gh release view "${RELEASE_VERSION}" --json "body" --jq ".body" )|" release_notes.txt
|
||||
|
||||
gh release create "${RELEASE_VERSION}" --repo "${ASSETS_REPOSITORY}" --title "${RELEASE_VERSION}" --generate-notes --notes-start-tag RELEASE_NOTES --notes-file release_notes.txt
|
||||
gh release edit "${RELEASE_VERSION}" --notes-file release_notes.txt
|
||||
fi
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user