Skip to content

Commit

Permalink
GH Actions: automatically add changelog line for updated UI version
Browse files Browse the repository at this point in the history
  • Loading branch information
MetRonnie committed Aug 14, 2023
1 parent c65efd0 commit 6131abd
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
8 changes: 8 additions & 0 deletions .github/workflows/update_ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,14 @@ jobs:
git commit -m "ui: install ${version}"
done
- name: Add to changelog
if: inputs.install
run: |
python3 -m pip install -q towncrier
towncrier create +.ui-version.md --content "Updated cylc-ui to ${{ inputs.install }}"
git add changes.d
commit --amend --no-edit
- name: push
run: |
git push origin "$HEAD_BRANCH"
Expand Down
6 changes: 5 additions & 1 deletion changes.d/changelog-template.jinja
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{% if sections[""] %}
{% for category, val in definitions.items() if category in sections[""] %}
{% if "ui-version" in sections[""] %}
[{{ sections[""]["ui-version"].keys()|first }}](https://github.com/cylc/cylc-ui/blob/master/CHANGES.md)

{% endif %}
{% for category, val in definitions.items() if category in sections[""] and category != "ui-version" %}
### {{ definitions[category]['name'] }}

{% for text, pulls in sections[""][category].items() %}
Expand Down
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ showcontent = true
directory = "fix"
name = "🔧 Fixes"
showcontent = true
[[tool.towncrier.type]]
directory = "ui-version"
name = "UI version"
showcontent = true


[tool.pytest.ini_options]
Expand Down

0 comments on commit 6131abd

Please sign in to comment.