From 6b1b122efc0a1faa13a2057fb7a1a63b3a959984 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Luis=20Cano=20Rodr=C3=ADguez?= Date: Sun, 22 Oct 2023 10:05:30 +0200 Subject: [PATCH] Attempt to fix release pipelines --- .github/workflows/lsp-release.yml | 4 ---- .github/workflows/vscode-release.yml | 3 --- scripts/make_release.py | 10 +++++----- 3 files changed, 5 insertions(+), 12 deletions(-) diff --git a/.github/workflows/lsp-release.yml b/.github/workflows/lsp-release.yml index 59fe49184..bf996d34b 100644 --- a/.github/workflows/lsp-release.yml +++ b/.github/workflows/lsp-release.yml @@ -25,10 +25,6 @@ jobs: python-version: "3.10" - run: | - - sudo apt update - sudo apt install pandoc - python --version python -m pip install --upgrade pip python -m pip install --upgrade tox bump2version towncrier docutils diff --git a/.github/workflows/vscode-release.yml b/.github/workflows/vscode-release.yml index 352875723..5d5f39c2c 100644 --- a/.github/workflows/vscode-release.yml +++ b/.github/workflows/vscode-release.yml @@ -34,9 +34,6 @@ jobs: ${{ runner.os }}-vscode-pip-deps - run: | - sudo apt update - sudo apt install pandoc - python --version python -m pip install --upgrade pip python -m pip install --upgrade tox hatch towncrier docutils diff --git a/scripts/make_release.py b/scripts/make_release.py index 5a9c7d564..e2f276d00 100755 --- a/scripts/make_release.py +++ b/scripts/make_release.py @@ -188,7 +188,7 @@ def generate_changelog(component: Component, version: str): """Generate the changelog for the release.""" changes = pathlib.Path(component["src"]) / "changes" - if IS_RELEASE and len(list(changes.glob("*.rst"))) == 0: + if IS_RELEASE and len(list(changes.glob("*.md"))) == 0: print("No changes detected, aborting") sys.exit(1) @@ -201,7 +201,7 @@ def generate_changelog(component: Component, version: str): print("Unable to get changelog!") sys.exit(1) - draft_file = pathlib.Path(tempfile.gettempdir()) / "changelog.rst" + draft_file = pathlib.Path(tempfile.gettempdir()) / "changelog.md" draft_file.write_text(draft) with Output(STEP_SUMMARY) as summary: @@ -212,20 +212,20 @@ def generate_changelog(component: Component, version: str): # Release notes for github run( - "rst2html.py", + "myst-docutils-html", "--template=changes/github-template.html", str(draft_file), ".changes.html", cwd=component["src"], ) - # Release notes for changelog. + # Release notes for changelog run("towncrier", "build", "--yes", f"--version={version}", cwd=component["src"]) # Needed for VSCode marketplace if component["name"] == "vscode": run( - *["pandoc", "CHANGES.rst", "-f", "rst", "-t", "gfm", "-o", "CHANGELOG.md"], + *["cp", "CHANGES.md", "CHANGELOG.md"], cwd=component["src"], )