Skip to content

Commit 57e8a22

Browse files
authored
Merge pull request #279 from nickhudkins/feat/automated-versioning
[CI] Automated Versioning
2 parents 17ebb65 + 02720ad commit 57e8a22

File tree

6 files changed

+364
-64
lines changed

6 files changed

+364
-64
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: automated-versioning
2+
on:
3+
pull_request:
4+
branches: [main]
5+
types: [closed]
6+
7+
jobs:
8+
release:
9+
runs-on: ubuntu-latest
10+
concurrency: release
11+
permissions:
12+
id-token: write
13+
contents: write
14+
15+
steps:
16+
- uses: actions/checkout@v4
17+
with:
18+
fetch-depth: 0
19+
20+
- name: Python Semantic Release
21+
uses: python-semantic-release/python-semantic-release@master
22+
with:
23+
github_token: ${{ secrets.GITHUB_TOKEN }}
24+
no_operation_mode: true
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: manual-versioning
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
levelBump:
6+
description: "Version level bump to apply (e.g., patch, minor, major)"
7+
required: true
8+
default: "patch"
9+
type: choice
10+
options:
11+
- "patch"
12+
- "minor"
13+
- "major"
14+
jobs:
15+
release:
16+
runs-on: ubuntu-latest
17+
concurrency: release
18+
permissions:
19+
id-token: write
20+
contents: write
21+
22+
steps:
23+
- uses: actions/checkout@v4
24+
with:
25+
fetch-depth: 0
26+
27+
- name: Python Semantic Release
28+
uses: python-semantic-release/python-semantic-release@master
29+
with:
30+
github_token: ${{ secrets.GITHUB_TOKEN }}
31+
force: ${{ github.event.inputs.levelBump }}
32+
verbosity: 2
33+
no_operation_mode: true

.github/workflows/pypi-publish.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
branches: [main]
66
paths:
77
- ".github/workflows/pypi-publish.yml"
8-
- "setup.py"
8+
- "pyproject.toml"
99

1010
jobs:
1111
build:
@@ -23,13 +23,13 @@ jobs:
2323
uses: actions/setup-python@master
2424
with:
2525
python-version: ${{ matrix.python-version }}
26-
- name: Install pip, setuptools, and wheel
27-
run: python -m pip install --upgrade pip setuptools wheel
26+
- name: Install pip, and pypa/build
27+
run: python -m pip install --upgrade pip build
2828
- name: Build Python distribution
2929
working-directory: .
3030
run: |
3131
rm -rf dist
32-
python setup.py bdist_wheel sdist --formats tar
32+
python -m build
3333
pushd dist >/dev/null || exit
3434
distrib=$(ls *.tar); distrib=${distrib/.tar/}
3535
mkdir -p ${distrib}

CHANGELOG.md

Lines changed: 265 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,265 @@
1+
# CHANGELOG
2+
3+
<!-- version list -->
4+
## v1.5.4 (2025-06-26)
5+
6+
- Added proper plugin config to fix `Unrecognised configuration name` error when any config is provided
7+
8+
## 1.5.3
9+
10+
- Added support for PyMdown Blocks extensions
11+
12+
## 1.5.2
13+
14+
- Update `markdown_inline_graphviz_extension` to use forked `markdown-graphviz-inline` instead due to abandonment of original dependency.
15+
16+
## 1.5.1
17+
18+
- Minimum supported Python version is now 3.9
19+
- Update dependency `mkdocs-material` to v9.5.46
20+
- Update dependency `mkdocs-redirects` to v1.2.2
21+
22+
## 1.5.0
23+
24+
- Renamed package namespace from `src` to `techdocs_core`
25+
- Fix small deprecation in tests (`assertEquals` -> `assertEqual`) as it was deprecated since Python 3.2 and removed in 3.12
26+
27+
## 1.4.2
28+
29+
- Fixes an issue where individual extension configurations were being ignored if the extension was included within `pymdownx.extra`. See [#147](https://github.com/backstage/mkdocs-techdocs-core/issues/147)
30+
31+
## 1.4.1
32+
33+
- Introduced mkdocs-redirects plugin (v`1.2.1`).
34+
35+
## 1.4.0
36+
37+
- Updated minimum mkdocs dependency from `1.5` to `1.6`
38+
- Fixes issue [#187](https://github.com/backstage/mkdocs-techdocs-core/issues/187)
39+
- mkdocs-material bumped to `9.5.27`
40+
41+
## 1.3.6
42+
43+
- Bumped `mkdocs-material` to `9.5.26`.
44+
45+
## 1.3.5
46+
47+
- Bumped `mkdocs-material` to `9.5.13` which adds support for card grids and grid layouts
48+
49+
## 1.3.3
50+
51+
- Bumped `mkdocs-material` to `9.4.14` which add support for: Mermaid.js version 10.6.1, emoji extension and updated MkDocs to 1.5.3
52+
- Added tests for `Python` version `3.11`
53+
54+
## 1.3.2
55+
56+
- Bumped `pymdown-extensions` to `10.3.1` which add material.extensions support
57+
- Removed support for `Python` version `3.7`
58+
59+
## 1.3.1
60+
61+
- Bumped `pygments` to `2.17.2` which includes JSX support.
62+
63+
## 1.3
64+
65+
- Bumped `mkdocs-material` (and its dependencies) from `9.1.3` to `9.2.7` causing a few changes:
66+
- MkDocs dependency is now `1.5`
67+
- `theme.palette` is now hardcoded to `{}` instead of `""` which caused some issues with some Material plugins
68+
69+
## 1.2.3
70+
71+
- Bumped `pygments` to `2.16.1`, which also fixes a [vulnerability](https://github.com/advisories/GHSA-mrwq-x4v8-fh7p).
72+
- Update dependency `plantuml-markdown` to `3.9.2`.
73+
74+
## 1.2.2
75+
76+
- Added config override of `pymdownx.snippets` for [security](https://github.com/facelessuser/pymdown-extensions/security/advisories/GHSA-jh85-wwv9-24hv). `restrict_base_path` will always be `true`. If you currently use snippets with files outside of the directory, those files will no longer be included.
77+
78+
## 1.2.1
79+
80+
- Use latest version of `pymdown-extensions` which contains [security fixes](https://github.com/backstage/mkdocs-techdocs-core/pull/123).
81+
82+
## 1.2.0
83+
84+
- Updated `mkdocs-material` (and its dependencies) from `8.1.11` to `9.1.3` causing a few changes:
85+
- Some `mkdocs-material` features were made opt-in v9. In order to preserve compatibility, they are now hardcoded as enabled by `mkdocs-techdocs-core`. The features are
86+
- `navigation.footer`
87+
- `content.action.edit`
88+
- `theme.palette` is now hardcoded to `""` to preserve previous behavior. Without hardcoding the palette, it gets the value `default`, causing unwanted visual changes.
89+
- Some components e.g. admonitions have a slightly different look.
90+
- Minor color changes that can be avoided by also updating to the latest version of `@backstage/plugin-techdocs` which compensates these changes.
91+
92+
## 1.1.7
93+
94+
- Updated `mkdocs-monorepo-plugin` to `1.0.4`, which includes a compatibility
95+
fix for `mkdocs` versions `1.4.0` and newer.
96+
97+
## 1.1.6
98+
99+
- Removed pins on the `pyparsing` and `Jinja2` dependencies, which are no
100+
longer needed.
101+
- Pinned `mkdocs-monorepo-plugin` and `markdown_inline_graphviz_extension` to
102+
specific (latest) releases to improve stability. Going forward, these (along
103+
with all other feature-related deps) will be bumped regularly and any changes
104+
will be reflected in this changelog.
105+
106+
## 1.1.5
107+
108+
- Added support for Python 3.10 [#73](https://github.com/backstage/mkdocs-techdocs-core/pull/73)
109+
- Resolved a run-time error introduced in `1.1.4` that prevented sites from
110+
being built under certain circumstances.
111+
112+
## 1.1.4
113+
114+
- Support markdown version >3.2,<4
115+
- Use markdown_inline_graphviz_extension 1.1.1 which supports svg rendering for markdown >=3.3
116+
117+
## 1.1.3
118+
119+
- Upgraded `plantuml-markdown` to `3.5.1`, which removes `uuid` as a dependency.
120+
121+
## 1.1.2
122+
123+
- Simplify theme code to update only the attribute necessary by backstage.
124+
125+
## 1.1.1
126+
127+
- Fix run-time `AttributeError: 'Theme' object has no attribute 'copy'`
128+
129+
## 1.1.0
130+
131+
- Add new capability to override mkdocs theme attributes
132+
133+
> **Note:** Look the caveats section in readme about the Backstage theme consideration
134+
135+
## 1.0.2
136+
137+
- Bumped `pymdown-extensions` to 9.3 and enabled `pygments_lang_class` to allow easier targeting of codeblocks by language in TechDocs Addons.
138+
139+
## 1.0.1
140+
141+
`Jinja2` pinned to v3.0.3.
142+
143+
## 1.0.0
144+
145+
- This package has been promoted to v1.0!
146+
147+
> **Note:** Going forward, this package will follow [semver](https://semver.org/#semantic-versioning-200) conventions.
148+
149+
## 0.2.3
150+
151+
- Upgrade mkdocs-material and its dependencies
152+
153+
## 0.2.2
154+
155+
- Update `plantuml-markdown` version to 3.5.0 for image maps support
156+
157+
## 0.2.1
158+
159+
- Fix run-time `module 'pyparsing' has no attribute 'downcaseTokens'` error as
160+
a result of shifting python dependencies.
161+
- Update to latest `mkdocs-monorepo-plugin`, which allows use of `.yaml` file
162+
extensions and non-slug-like `site_name`s in monorepos.
163+
164+
## 0.2.0
165+
166+
- Add mdx_truly_sane_lists for dealing with the very annoying bullet differences in mkdocs vs commonmark / gf markdown. See <https://github.com/backstage/backstage/issues/6057#issuecomment-862822002>
167+
168+
## 0.1.2
169+
170+
- Fix the dependency version of Markdown to ensure GraphViz SVG rendering works.
171+
172+
## 0.1.1
173+
174+
- Ensure required mkdocs-monorepo-plugin is compatible with Mkdocs `1.2.x`.
175+
176+
## 0.1.0
177+
178+
- Improved dependency compatibility with other mkdocs plugins.
179+
- Upgraded mkdocs minimum to `1.2.2`
180+
181+
## 0.0.16
182+
183+
- Reused data from `requirements.txt` file in `install_requires` of `setup.py`. [#24](https://github.com/backstage/mkdocs-techdocs-core/pull/24)
184+
185+
## 0.0.15
186+
187+
- Upgrade monorepo to track latest patch, includes various bug fixes. [#22](https://github.com/backstage/mkdocs-techdocs-core/pull/22)
188+
189+
## 0.0.14
190+
191+
- Upgrade plantuml-markdown to 3.4.2 with support for external file sources. [#18](https://github.com/backstage/mkdocs-techdocs-core/pull/18)
192+
193+
## 0.0.13
194+
195+
- Fixed issue where the whole temp directory could be included in the built site output. [#7](https://github.com/backstage/mkdocs-techdocs-core/issues/7)
196+
197+
## 0.0.12
198+
199+
- Updated home repository to be the new <https://github.com/backstage/mkdocs-techdocs-core>
200+
201+
## 0.0.11
202+
203+
- Any MkDocs plugin configurations from mkdocs.yml will now work and override the default configuration. See <https://github.com/backstage/backstage/issues/3017>
204+
205+
## 0.0.10
206+
207+
- Pin Markdown version to fix issue with Graphviz
208+
209+
## 0.0.9
210+
211+
- Change development status to 3 - Alpha
212+
213+
## 0.0.8
214+
215+
- Superfences and Codehilite doesn't work very well together (squidfunk/mkdocs-material#1604) so therefore the codehilite extension is replaced by pymdownx.highlight
216+
217+
- Uses pymdownx extensions v.7.1 instead of 8.0.0 to allow legacy_tab_classes config. This makes the techdocs core plugin compatible with the usage of tabs for grouping markdown with the following syntax:
218+
219+
````
220+
```java tab="java 2"
221+
public void function() {
222+
....
223+
}
224+
```
225+
````
226+
227+
as well as the new
228+
229+
````
230+
=== "Java"
231+
232+
```java
233+
public void function() {
234+
....
235+
}
236+
```
237+
````
238+
239+
The pymdownx extension will be bumped too 8.0.0 in the near future.
240+
241+
- pymdownx.tabbed is added to support tabs to group markdown content, such as codeblocks.
242+
243+
- "PyMdown Extensions includes three extensions that are meant to replace their counterpart in the default Python Markdown extensions." Therefore some extensions has been taken away in this version that comes by default from pymdownx.extra which is added now (<https://facelessuser.github.io/pymdown-extensions/usage_notes/#incompatible-extensions>)
244+
245+
## 0.0.7
246+
247+
- Fix an issue with configuration of emoji support
248+
249+
## 0.0.6
250+
251+
- Further adjustments to versions to find ones that are compatible
252+
253+
## 0.0.5
254+
255+
- Downgrade some versions of markdown extensions to versions that are more stable
256+
257+
## 0.0.4
258+
259+
- Added support for more mkdocs extensions
260+
- mkdocs-material
261+
- mkdocs-monorepo-plugin
262+
- plantuml-markdown
263+
- markdown_inline_graphviz_extension
264+
- pygments
265+
- pymdown-extensions

pyproject.toml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
[build-system]
2+
requires = ["setuptools"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
7+
name = "mkdocs-techdocs-core"
8+
version = "1.5.4"
9+
description = """The core MkDocs plugin used by Backstage's TechDocs as a wrapper around multiple MkDocs plugins and Python Markdown extensions"""
10+
readme = "README.md"
11+
requires-python = ">=3.9"
12+
license-files = ["LICENSE"]
13+
keywords = ["mkdocs"]
14+
authors = [
15+
{name = "TechDocs Core", email = "[email protected]"}
16+
]
17+
classifiers = [
18+
"Development Status :: 3 - Alpha",
19+
"Intended Audience :: Developers",
20+
"Intended Audience :: Information Technology",
21+
"Programming Language :: Python",
22+
"Programming Language :: Python :: 3 :: Only",
23+
"Programming Language :: Python :: 3.9",
24+
"Programming Language :: Python :: 3.10",
25+
"Programming Language :: Python :: 3.11",
26+
"Programming Language :: Python :: 3.12",
27+
"Programming Language :: Python :: 3.13",
28+
]
29+
dynamic = ["dependencies"]
30+
31+
[project.entry-points]
32+
"mkdocs.plugins" = {"techdocs-core" = "techdocs_core.core:TechDocsCore"}
33+
34+
[tool.setuptools.dynamic]
35+
dependencies = {file = ["requirements.txt"]}
36+
37+
[tool.setuptools.packages.find]
38+
include = ["techdocs_core"]

0 commit comments

Comments
 (0)