Skip to content

Commit 9e08190

Browse files
authored
Merge pull request #282 from nickhudkins/chore/release-docs
feat(ci): enable manual versioning
2 parents 2a67bd1 + b6cc7ad commit 9e08190

3 files changed

Lines changed: 21 additions & 295 deletions

File tree

.github/workflows/automated-versioning.yml

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

.github/workflows/manual-versioning.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@ on:
33
workflow_dispatch:
44
inputs:
55
levelBump:
6-
description: "Version level bump to apply (e.g., patch, minor, major)"
6+
description: "Version level bump to apply (e.g., auto, patch, minor, major)."
77
required: true
8-
default: "patch"
8+
default: "auto"
99
type: choice
1010
options:
11+
- "auto"
1112
- "patch"
1213
- "minor"
1314
- "major"
@@ -24,10 +25,17 @@ jobs:
2425
with:
2526
fetch-depth: 0
2627

27-
- name: Python Semantic Release
28+
- name: Python Semantic Release (Automatic)
29+
if: github.event.inputs.levelBump == 'auto'
30+
uses: python-semantic-release/python-semantic-release@master
31+
with:
32+
github_token: ${{ secrets.GITHUB_TOKEN }}
33+
verbosity: 2
34+
35+
- name: Python Semantic Release (Manual)
36+
if: github.event.inputs.levelBump != 'auto'
2837
uses: python-semantic-release/python-semantic-release@master
2938
with:
3039
github_token: ${{ secrets.GITHUB_TOKEN }}
3140
force: ${{ github.event.inputs.levelBump }}
3241
verbosity: 2
33-
no_operation_mode: true

README.md

Lines changed: 9 additions & 267 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,13 @@ techdocs:
9494

9595
### Release
9696

97-
1. Update the [Changelog](https://github.com/backstage/mkdocs-techdocs-core/blob/main/README.md#changelog).
98-
2. Bump up the version number in `setup.py` which triggers the release workflow on [GitHub Actions](.github/workflows/pypi-publish.yml) to publish a new version in PyPI.
97+
In order to publish a release, you must manually dispatch the [`manual-versioning`](https://github.com/backstage/mkdocs-techdocs-core/actions/workflows/manual-versioning.yml) GitHub Action. Please see the official GitHub documentation on [Manual Workflows](https://docs.github.com/en/actions/how-tos/managing-workflow-runs-and-deployments/managing-workflow-runs/manually-running-a-workflow?tool=webui) for full instructions.
98+
99+
> [!TIP]
100+
> If you decide to provide an explicit `levelBump`, please respect SemVer. When left empty, PSR will determine the best version bump based on the commits since the previous release. Automatic Versioning does rely on `conventional-commits` which is **not** enforced within this project.
101+
102+
This project utilizes PSR (Python Semantic Release) to create releases.
103+
Release Notes will be generated from commit messages and the [CHANGELOG.md](CHANGELOG.md) will be automatically updated with all commits since the previous release.
99104

100105
## MkDocs plugins and extensions
101106

@@ -151,275 +156,12 @@ build container).
151156

152157
## Caveats
153158

159+
## [Changelog](CHANGELOG.md)
160+
154161
### Theme
155162

156163
We only use `material-mkdocs` as base styles because Backstage also uses the `Material UI` on the client-side. We don't expect people to use themes other than `Material UI` to maintain consistency across all Backstage pages (in other words, documentation pages have the same look and feel as any other Backstage page) and so we use the `BackstageTheme` configured in Front-end application as the source of truth for all application design tokens like colors, typography and etc. So here you can [see](https://github.com/backstage/backstage/blob/master/plugins/techdocs/src/reader/components/TechDocsReaderPageContent/dom.tsx#L160-L692) that some styles will always be overridden regardless of the `mkdocs-material` plugin theme settings and this can cause unexpected behavior for those who override the theme setting in a `mkdocs.yaml` file.
157164

158-
## Changelog
159-
160-
### 1.5.4
161-
162-
- Added proper plugin config to fix `Unrecognised configuration name` error when any config is provided
163-
164-
### 1.5.3
165-
166-
- Added support for PyMdown Blocks extensions
167-
168-
### 1.5.2
169-
170-
- Update `markdown_inline_graphviz_extension` to use forked `markdown-graphviz-inline` instead due to abandonment of original dependency.
171-
172-
### 1.5.1
173-
174-
- Minimum supported Python version is now 3.9
175-
- Update dependency `mkdocs-material` to v9.5.46
176-
- Update dependency `mkdocs-redirects` to v1.2.2
177-
178-
### 1.5.0
179-
180-
- Renamed package namespace from `src` to `techdocs_core`
181-
- Fix small deprecation in tests (`assertEquals` -> `assertEqual`) as it was deprecated since Python 3.2 and removed in 3.12
182-
183-
### 1.4.2
184-
185-
- 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)
186-
187-
### 1.4.1
188-
189-
- Introduced mkdocs-redirects plugin (v`1.2.1`).
190-
191-
### 1.4.0
192-
193-
- Updated minimum mkdocs dependency from `1.5` to `1.6`
194-
- Fixes issue [#187](https://github.com/backstage/mkdocs-techdocs-core/issues/187)
195-
- mkdocs-material bumped to `9.5.27`
196-
197-
### 1.3.6
198-
199-
- Bumped `mkdocs-material` to `9.5.26`.
200-
201-
### 1.3.5
202-
203-
- Bumped `mkdocs-material` to `9.5.13` which adds support for card grids and grid layouts
204-
205-
### 1.3.3
206-
207-
- 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
208-
- Added tests for `Python` version `3.11`
209-
210-
### 1.3.2
211-
212-
- Bumped `pymdown-extensions` to `10.3.1` which add material.extensions support
213-
- Removed support for `Python` version `3.7`
214-
215-
### 1.3.1
216-
217-
- Bumped `pygments` to `2.17.2` which includes JSX support.
218-
219-
### 1.3
220-
221-
- Bumped `mkdocs-material` (and its dependencies) from `9.1.3` to `9.2.7` causing a few changes:
222-
- MkDocs dependency is now `1.5`
223-
- `theme.palette` is now hardcoded to `{}` instead of `""` which caused some issues with some Material plugins
224-
225-
### 1.2.3
226-
227-
- Bumped `pygments` to `2.16.1`, which also fixes a [vulnerability](https://github.com/advisories/GHSA-mrwq-x4v8-fh7p).
228-
- Update dependency `plantuml-markdown` to `3.9.2`.
229-
230-
### 1.2.2
231-
232-
- 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.
233-
234-
### 1.2.1
235-
236-
- Use latest version of `pymdown-extensions` which contains [security fixes](https://github.com/backstage/mkdocs-techdocs-core/pull/123).
237-
238-
### 1.2.0
239-
240-
- Updated `mkdocs-material` (and its dependencies) from `8.1.11` to `9.1.3` causing a few changes:
241-
- 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
242-
- `navigation.footer`
243-
- `content.action.edit`
244-
- `theme.palette` is now hardcoded to `""` to preserve previous behavior. Without hardcoding the palette, it gets the value `default`, causing unwanted visual changes.
245-
- Some components e.g. admonitions have a slightly different look.
246-
- Minor color changes that can be avoided by also updating to the latest version of `@backstage/plugin-techdocs` which compensates these changes.
247-
248-
### 1.1.7
249-
250-
- Updated `mkdocs-monorepo-plugin` to `1.0.4`, which includes a compatibility
251-
fix for `mkdocs` versions `1.4.0` and newer.
252-
253-
### 1.1.6
254-
255-
- Removed pins on the `pyparsing` and `Jinja2` dependencies, which are no
256-
longer needed.
257-
- Pinned `mkdocs-monorepo-plugin` and `markdown_inline_graphviz_extension` to
258-
specific (latest) releases to improve stability. Going forward, these (along
259-
with all other feature-related deps) will be bumped regularly and any changes
260-
will be reflected in this changelog.
261-
262-
### 1.1.5
263-
264-
- Added support for Python 3.10 [#73](https://github.com/backstage/mkdocs-techdocs-core/pull/73)
265-
- Resolved a run-time error introduced in `1.1.4` that prevented sites from
266-
being built under certain circumstances.
267-
268-
### 1.1.4
269-
270-
- Support markdown version >3.2,<4
271-
- Use markdown_inline_graphviz_extension 1.1.1 which supports svg rendering for markdown >=3.3
272-
273-
### 1.1.3
274-
275-
- Upgraded `plantuml-markdown` to `3.5.1`, which removes `uuid` as a dependency.
276-
277-
### 1.1.2
278-
279-
- Simplify theme code to update only the attribute necessary by backstage.
280-
281-
### 1.1.1
282-
283-
- Fix run-time `AttributeError: 'Theme' object has no attribute 'copy'`
284-
285-
### 1.1.0
286-
287-
- Add new capability to override mkdocs theme attributes
288-
289-
> **Note:** Look the caveats section in readme about the Backstage theme consideration
290-
291-
### 1.0.2
292-
293-
- Bumped `pymdown-extensions` to 9.3 and enabled `pygments_lang_class` to allow easier targeting of codeblocks by language in TechDocs Addons.
294-
295-
### 1.0.1
296-
297-
`Jinja2` pinned to v3.0.3.
298-
299-
### 1.0.0
300-
301-
- This package has been promoted to v1.0!
302-
303-
> **Note:** Going forward, this package will follow [semver](https://semver.org/#semantic-versioning-200) conventions.
304-
305-
### 0.2.3
306-
307-
- Upgrade mkdocs-material and its dependencies
308-
309-
### 0.2.2
310-
311-
- Update `plantuml-markdown` version to 3.5.0 for image maps support
312-
313-
### 0.2.1
314-
315-
- Fix run-time `module 'pyparsing' has no attribute 'downcaseTokens'` error as
316-
a result of shifting python dependencies.
317-
- Update to latest `mkdocs-monorepo-plugin`, which allows use of `.yaml` file
318-
extensions and non-slug-like `site_name`s in monorepos.
319-
320-
### 0.2.0
321-
322-
- 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
323-
324-
### 0.1.2
325-
326-
- Fix the dependency version of Markdown to ensure GraphViz SVG rendering works.
327-
328-
### 0.1.1
329-
330-
- Ensure required mkdocs-monorepo-plugin is compatible with Mkdocs `1.2.x`.
331-
332-
### 0.1.0
333-
334-
- Improved dependency compatibility with other mkdocs plugins.
335-
- Upgraded mkdocs minimum to `1.2.2`
336-
337-
### 0.0.16
338-
339-
- Reused data from `requirements.txt` file in `install_requires` of `setup.py`. [#24](https://github.com/backstage/mkdocs-techdocs-core/pull/24)
340-
341-
### 0.0.15
342-
343-
- Upgrade monorepo to track latest patch, includes various bug fixes. [#22](https://github.com/backstage/mkdocs-techdocs-core/pull/22)
344-
345-
### 0.0.14
346-
347-
- Upgrade plantuml-markdown to 3.4.2 with support for external file sources. [#18](https://github.com/backstage/mkdocs-techdocs-core/pull/18)
348-
349-
### 0.0.13
350-
351-
- 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)
352-
353-
### 0.0.12
354-
355-
- Updated home repository to be the new https://github.com/backstage/mkdocs-techdocs-core
356-
357-
### 0.0.11
358-
359-
- Any MkDocs plugin configurations from mkdocs.yml will now work and override the default configuration. See https://github.com/backstage/backstage/issues/3017
360-
361-
### 0.0.10
362-
363-
- Pin Markdown version to fix issue with Graphviz
364-
365-
### 0.0.9
366-
367-
- Change development status to 3 - Alpha
368-
369-
### 0.0.8
370-
371-
- Superfences and Codehilite doesn't work very well together (squidfunk/mkdocs-material#1604) so therefore the codehilite extension is replaced by pymdownx.highlight
372-
373-
* 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:
374-
375-
````
376-
```java tab="java 2"
377-
public void function() {
378-
....
379-
}
380-
```
381-
````
382-
383-
as well as the new
384-
385-
````
386-
=== "Java"
387-
388-
```java
389-
public void function() {
390-
....
391-
}
392-
```
393-
````
394-
395-
The pymdownx extension will be bumped too 8.0.0 in the near future.
396-
397-
- pymdownx.tabbed is added to support tabs to group markdown content, such as codeblocks.
398-
399-
- "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)
400-
401-
### 0.0.7
402-
403-
- Fix an issue with configuration of emoji support
404-
405-
### 0.0.6
406-
407-
- Further adjustments to versions to find ones that are compatible
408-
409-
### 0.0.5
410-
411-
- Downgrade some versions of markdown extensions to versions that are more stable
412-
413-
### 0.0.4
414-
415-
- Added support for more mkdocs extensions
416-
- mkdocs-material
417-
- mkdocs-monorepo-plugin
418-
- plantuml-markdown
419-
- markdown_inline_graphviz_extension
420-
- pygments
421-
- pymdown-extensions
422-
423165
## License
424166

425167
Copyright 2020-2023 © The Backstage Authors. All rights reserved. The Linux Foundation has registered trademarks and uses trademarks. For a list of trademarks of The Linux Foundation, please see our Trademark Usage page: https://www.linuxfoundation.org/trademark-usage

0 commit comments

Comments
 (0)