Skip to content

Commit 2e608f9

Browse files
committed
fix: Use PSR's templating mechanism instead of a script
1 parent 812b098 commit 2e608f9

4 files changed

Lines changed: 21 additions & 19 deletions

File tree

.github/workflows/semantic-release.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,6 @@ jobs:
5656
echo "released=false" >> $GITHUB_OUTPUT
5757
fi
5858
59-
- name: Update CITATION.cff date-released
60-
run: python update_citation_date.py
61-
6259
- name: Publish package distributions to PyPI
6360
uses: pypa/gh-action-pypi-publish@release/v1
6461
if: steps.release.outputs.released == 'true'

.templates/CITATION.cff.j2

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{%- set release = ctx.history.released.values() | first -%}
2+
cff-version: 1.2.0
3+
message: "If you use pdfbaker in your work, please cite it using the following metadata."
4+
title: "pdfbaker"
5+
version: {{ release.version | string }}
6+
date-released: {{ release.tagged_date.strftime("%Y-%m-%d") }}
7+
repository-code: "https://github.com/pythonnz/pdfbaker"
8+
license: "MIT"
9+
authors:
10+
- family-names: Adair
11+
given-names: Danny
12+
orcid: "https://orcid.org/0009-0004-8327-955X"
13+
keywords:
14+
- PDF
15+
- SVG
16+
- YAML
17+
- CLI
18+
- Python

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ tag_format = "{version}"
7575
commit_version_number = true
7676
commit_message = "RELEASE: {version}"
7777

78+
[tool.semantic_release.changelog]
79+
template_dir = ".templates"
80+
7881
[tool.semantic_release.changelog_sections]
7982
feat = "Features"
8083
fix = "Bug Fixes"

update_citation_date.py

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)