ci: add automated note on new releases [skip ci]

This commit is contained in:
Baptiste Augrain 2022-08-31 10:37:08 +02:00
parent c9614d1d31
commit ec4cc3a277
2 changed files with 4 additions and 2 deletions

View file

@ -26,7 +26,7 @@ if [[ "${LATEST_VERSION}" =~ ^([0-9]+\.[0-9]+\.[0-9]+) ]]; then
elif [[ "${VSCODE_QUALITY}" == "insider" ]]; then
BODY=$( echo "${GITHUB_RESPONSE}" | jq -c -r '.body' )
if [[ "${BODY}" =~ ^MS_COMMIT:[[:blank:]]([a-z0-9]+) ]]; then
if [[ "${BODY}" =~ \[([a-z0-9]+)\] ]]; then
if [ "${MS_COMMIT}" != "${BASH_REMATCH[1]}" ]; then
echo "New VSCode Insiders version, new build"
export SHOULD_BUILD="yes"

View file

@ -12,15 +12,17 @@ REPO_NAME="${GITHUB_REPOSITORY:(${#OWNER}+1)}"
if [[ "${VSCODE_QUALITY}" == "insider" ]]; then
REPOSITORY="${REPO_NAME:-"vscodium"}-insiders"
NOTES="update to [${MS_COMMIT}](https://github.com/microsoft/vscode/tree/${MS_COMMIT})"
else
REPOSITORY="${REPO_NAME:-"vscodium"}"
NOTES="update to [${MS_TAG}](https://code.visualstudio.com/updates/v$( echo ${MS_TAG//./_} \| cut -d'_' -f 1,2 ))"
fi
npm install -g github-release-cli
if [[ $( gh release view --repo "${OWNER}/${REPOSITORY}" "${RELEASE_VERSION}" 2>&1 ) =~ "release not found" ]]; then
echo "Creating release '${RELEASE_VERSION}'"
gh release create --repo "${OWNER}/${REPOSITORY}" "${RELEASE_VERSION}"
gh release create "${RELEASE_VERSION}" --repo "${OWNER}/${REPOSITORY}" --notes "${NOTES}"
fi
cd artifacts