Repository: gradio-app/gradio

Issue:
Add release notes for every release
- [x] I have searched to see if a similar issue already exists.


**Is your feature request related to a problem? Please describe.**  
As a gradio user, it is unclear to me what changes were made in between gradio releases. 

**Describe the solution you'd like**  
I would like to see release notes for every release on github and or the gradio.app website so I can determine if I should upgrade to a new version of gradio.


**Additional context**  
Related to #1646 



Discussion:
cc @aliabd
@pngwn I recall you said something about not liking automated release notes?

I haven't used them before, but I think Github's [automated release notes](https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes) feature could be a quick way to start providing more info to uses regarding changes.

And it seems to integrate nicely with the action we're using to create the github relesae. All it seems we have to do is start labelling our PRs with what kind of change they are.

Curious on your thoughts, or anyone else's! 

Resolving patch:
diff --git a/scripts/format_release_notes.py b/scripts/format_release_notes.py
new file mode 100644
--- /dev/null
+++ b/scripts/format_release_notes.py
@@ -0,0 +1,50 @@
+import shutil
+import pathlib
+import argparse
+import textwrap
+
+current_dir = (pathlib.Path(__file__).parent / "..").resolve()
+
+TEMPLATE = """# Upcoming Release 
+
+## New Features:
+No changes to highlight.
+
+## Bug Fixes:
+No changes to highlight.
+
+## Documentation Changes:
+No changes to highlight.
+
+## Testing and Infrastructure Changes:
+No changes to highlight.
+
+## Breaking Changes:
+No changes to highlight.
+
+## Full Changelog:
+No changes to highlight.
+
+## Contributors Shoutout:
+No changes to highlight.
+
+
+"""
+
+
+def format_release_notes(latest_version: str):
+    upcoming = current_dir / "CHANGELOG.md"
+    with open(upcoming, "r") as latest:
+        lines = latest.readlines()
+        assert lines[0] == "# Upcoming Release \n"
+    with open(upcoming, "w") as latest:
+        lines[0] = latest_version.replace("v", "# Version ") + "\n"
+        lines = textwrap.dedent(TEMPLATE).splitlines(keepends=True) + lines
+        latest.writelines(lines)
+
+
+if __name__ == "__main__":
+    parser = argparse.ArgumentParser(description="Upload a demo to a space")
+    parser.add_argument("latest_version", type=str, help="Name of demo to upload")
+    args = parser.parse_args()
+    format_release_notes(args.latest_version)
diff --git a/website/homepage/build.py b/website/homepage/build.py
--- a/website/homepage/build.py
+++ b/website/homepage/build.py
@@ -1,7 +1,7 @@
 import os
 import shutil
 import jinja2
-from src import index, guides, docs, demos
+from src import index, guides, docs, demos, changelog
 
 SRC_DIR = "src"
 BUILD_DIR = "build"
@@ -17,4 +17,5 @@
 guides.build(BUILD_DIR, jinja_env)
 docs.build(BUILD_DIR, jinja_env)
 demos.build(BUILD_DIR, jinja_env)
+changelog.build(BUILD_DIR, jinja_env)
 
diff --git a/website/homepage/src/changelog/__init__.py b/website/homepage/src/changelog/__init__.py
new file mode 100644
--- /dev/null
+++ b/website/homepage/src/changelog/__init__.py
@@ -0,0 +1,55 @@
+import os
+import markdown2
+import shutil
+import re
+
+DIR = os.path.dirname(__file__)
+INNER_TEMPLATE_FILE = os.path.join(DIR, "inner_template.html")
+CHANGELOG_FILE = os.path.join(DIR, "..", "..", "..", "..", "CHANGELOG.md")
+
+def render_md():
+    with open(CHANGELOG_FILE, "r") as change_file:
+        content = change_file.read()
+    
+    # replace code blocks correctly
+    content = re.sub(
+            r"```([a-z]+)\n",
+            lambda x: f"<div class='codeblock'><pre><code class='lang-{x.group(1)}'>",
+            content,
+        )
+    content = re.sub(r"```", "</code></pre></div>", content)
+   
+    # remove empty/unused sections
+    content = re.sub(r"## [\w^:\n ]*No changes to highlight.", "", content)
+
+    # get versions and their correct href
+    versions = re.findall(r"# Version \d\.\d[^\n ]*", content)
+    versions = [("Upcoming Release", "upcoming-release")] + [("v" + v.strip("# Version "), "version-" + v.strip("# Version ").replace('.','')) for v in versions]
+
+
+    content_html = markdown2.markdown(
+                content,
+                extras=[
+                    "target-blank-links",
+                    "header-ids",
+                    "tables",
+                    "fenced-code-blocks",
+                ],
+            )
+
+    with open(INNER_TEMPLATE_FILE, "w+") as temp_html:
+        temp_html.write(content_html)
+
+    return versions
+
+
+def build(output_dir, jinja_env):
+    versions = render_md()
+    os.makedirs(output_dir, exist_ok=True)
+    template = jinja_env.get_template("changelog/parent_template.html")
+    output = template.render(versions=versions)
+    output_folder = os.path.join(output_dir, "changelog")
+    os.makedirs(output_folder)
+    output_file = os.path.join(output_folder, "index.html")
+    with open(output_file, "w") as index_html:
+        index_html.write(output)


Test patch: