Skip to content

Commit

Permalink
Attempt to fix release pipelines
Browse files Browse the repository at this point in the history
  • Loading branch information
astrojuanlu committed Oct 22, 2023
1 parent 46a4c3d commit 6b1b122
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 12 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/lsp-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/vscode-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions scripts/make_release.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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:
Expand All @@ -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"],
)

Expand Down

0 comments on commit 6b1b122

Please sign in to comment.