Browse Source

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

Baptiste Augrain 2 years ago
parent
commit
cfd36105f5
2 changed files with 4 additions and 2 deletions
  1. 1 1
      check_tags.sh
  2. 3 1
      release.sh

+ 1 - 1
check_tags.sh

@@ -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"

+ 3 - 1
release.sh

@@ -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