python-semantic-release 9.8.5__tar.gz → 9.8.7__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (147) hide show
  1. {python_semantic_release-9.8.5/python_semantic_release.egg-info → python_semantic_release-9.8.7}/PKG-INFO +3 -4
  2. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/docs/automatic-releases/github-actions.rst +33 -31
  3. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/docs/changelog_templates.rst +17 -14
  4. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/docs/configuration.rst +18 -7
  5. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/docs/github-action.rst +3 -1
  6. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/pyproject.toml +4 -4
  7. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7/python_semantic_release.egg-info}/PKG-INFO +3 -4
  8. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/python_semantic_release.egg-info/requires.txt +2 -3
  9. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/semantic_release/__init__.py +1 -1
  10. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/semantic_release/cli/changelog_writer.py +6 -0
  11. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/semantic_release/cli/commands/changelog.py +5 -2
  12. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/semantic_release/cli/commands/version.py +13 -2
  13. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/tests/command_line/test_changelog.py +1 -1
  14. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/tests/command_line/test_version.py +4 -4
  15. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/tests/scenario/test_next_version.py +1 -1
  16. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/tests/scenario/test_release_history.py +1 -1
  17. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/tests/unit/semantic_release/cli/test_util.py +1 -1
  18. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/tests/unit/semantic_release/hvcs/test__base.py +1 -1
  19. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/tests/unit/semantic_release/version/test_declaration.py +1 -1
  20. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/AUTHORS.rst +0 -0
  21. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/LICENSE +0 -0
  22. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/MANIFEST.in +0 -0
  23. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/README.rst +0 -0
  24. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/docs/Makefile +0 -0
  25. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/docs/algorithm.rst +0 -0
  26. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/docs/automatic-releases/cronjobs.rst +0 -0
  27. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/docs/automatic-releases/index.rst +0 -0
  28. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/docs/automatic-releases/travis.rst +0 -0
  29. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/docs/commands.rst +0 -0
  30. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/docs/commit-parsing.rst +0 -0
  31. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/docs/conf.py +0 -0
  32. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/docs/contributing.rst +0 -0
  33. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/docs/contributors.rst +0 -0
  34. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/docs/index.rst +0 -0
  35. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/docs/make.bat +0 -0
  36. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/docs/migrating_from_v7.rst +0 -0
  37. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/docs/multibranch_releases.rst +0 -0
  38. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/docs/strict_mode.rst +0 -0
  39. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/docs/troubleshooting.rst +0 -0
  40. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/python_semantic_release.egg-info/SOURCES.txt +0 -0
  41. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/python_semantic_release.egg-info/dependency_links.txt +0 -0
  42. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/python_semantic_release.egg-info/entry_points.txt +0 -0
  43. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/python_semantic_release.egg-info/top_level.txt +0 -0
  44. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/semantic_release/__main__.py +0 -0
  45. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/semantic_release/changelog/__init__.py +0 -0
  46. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/semantic_release/changelog/context.py +0 -0
  47. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/semantic_release/changelog/release_history.py +0 -0
  48. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/semantic_release/changelog/template.py +0 -0
  49. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/semantic_release/cli/__init__.py +0 -0
  50. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/semantic_release/cli/cli_context.py +0 -0
  51. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/semantic_release/cli/commands/__init__.py +0 -0
  52. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/semantic_release/cli/commands/generate_config.py +0 -0
  53. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/semantic_release/cli/commands/main.py +0 -0
  54. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/semantic_release/cli/commands/publish.py +0 -0
  55. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/semantic_release/cli/config.py +0 -0
  56. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/semantic_release/cli/const.py +0 -0
  57. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/semantic_release/cli/github_actions_output.py +0 -0
  58. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/semantic_release/cli/masking_filter.py +0 -0
  59. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/semantic_release/cli/util.py +0 -0
  60. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/semantic_release/commit_parser/__init__.py +0 -0
  61. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/semantic_release/commit_parser/_base.py +0 -0
  62. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/semantic_release/commit_parser/angular.py +0 -0
  63. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/semantic_release/commit_parser/emoji.py +0 -0
  64. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/semantic_release/commit_parser/scipy.py +0 -0
  65. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/semantic_release/commit_parser/tag.py +0 -0
  66. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/semantic_release/commit_parser/token.py +0 -0
  67. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/semantic_release/commit_parser/util.py +0 -0
  68. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/semantic_release/const.py +0 -0
  69. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/semantic_release/data/templates/CHANGELOG.md.j2 +0 -0
  70. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/semantic_release/data/templates/release_notes.md.j2 +0 -0
  71. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/semantic_release/enums.py +0 -0
  72. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/semantic_release/errors.py +0 -0
  73. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/semantic_release/gitproject.py +0 -0
  74. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/semantic_release/helpers.py +0 -0
  75. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/semantic_release/hvcs/__init__.py +0 -0
  76. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/semantic_release/hvcs/_base.py +0 -0
  77. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/semantic_release/hvcs/bitbucket.py +0 -0
  78. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/semantic_release/hvcs/gitea.py +0 -0
  79. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/semantic_release/hvcs/github.py +0 -0
  80. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/semantic_release/hvcs/gitlab.py +0 -0
  81. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/semantic_release/hvcs/remote_hvcs_base.py +0 -0
  82. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/semantic_release/hvcs/token_auth.py +0 -0
  83. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/semantic_release/hvcs/util.py +0 -0
  84. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/semantic_release/version/__init__.py +0 -0
  85. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/semantic_release/version/algorithm.py +0 -0
  86. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/semantic_release/version/declaration.py +0 -0
  87. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/semantic_release/version/translator.py +0 -0
  88. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/semantic_release/version/version.py +0 -0
  89. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/setup.cfg +0 -0
  90. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/tests/__init__.py +0 -0
  91. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/tests/command_line/__init__.py +0 -0
  92. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/tests/command_line/conftest.py +0 -0
  93. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/tests/command_line/test_generate_config.py +0 -0
  94. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/tests/command_line/test_help.py +0 -0
  95. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/tests/command_line/test_main.py +0 -0
  96. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/tests/command_line/test_publish.py +0 -0
  97. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/tests/conftest.py +0 -0
  98. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/tests/const.py +0 -0
  99. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/tests/fixtures/__init__.py +0 -0
  100. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/tests/fixtures/commit_parsers.py +0 -0
  101. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/tests/fixtures/example_project.py +0 -0
  102. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/tests/fixtures/git_repo.py +0 -0
  103. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/tests/fixtures/repos/__init__.py +0 -0
  104. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/tests/fixtures/repos/git_flow/__init__.py +0 -0
  105. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/tests/fixtures/repos/git_flow/repo_w_2_release_channels.py +0 -0
  106. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/tests/fixtures/repos/git_flow/repo_w_3_release_channels.py +0 -0
  107. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/tests/fixtures/repos/github_flow/__init__.py +0 -0
  108. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/tests/fixtures/repos/github_flow/repo_w_release_channels.py +0 -0
  109. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/tests/fixtures/repos/trunk_based_dev/__init__.py +0 -0
  110. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/tests/fixtures/repos/trunk_based_dev/repo_w_no_tags.py +0 -0
  111. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/tests/fixtures/repos/trunk_based_dev/repo_w_prereleases.py +0 -0
  112. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/tests/fixtures/repos/trunk_based_dev/repo_w_tags.py +0 -0
  113. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/tests/fixtures/scipy.py +0 -0
  114. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/tests/scenario/__init__.py +0 -0
  115. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/tests/scenario/test_template_render.py +0 -0
  116. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/tests/unit/__init__.py +0 -0
  117. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/tests/unit/semantic_release/__init__.py +0 -0
  118. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/tests/unit/semantic_release/changelog/__init__.py +0 -0
  119. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/tests/unit/semantic_release/changelog/test_changelog_context.py +0 -0
  120. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/tests/unit/semantic_release/changelog/test_default_changelog.py +0 -0
  121. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/tests/unit/semantic_release/changelog/test_release_notes.py +0 -0
  122. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/tests/unit/semantic_release/changelog/test_template.py +0 -0
  123. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/tests/unit/semantic_release/cli/__init__.py +0 -0
  124. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/tests/unit/semantic_release/cli/test_config.py +0 -0
  125. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/tests/unit/semantic_release/cli/test_github_actions_output.py +0 -0
  126. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/tests/unit/semantic_release/cli/test_masking_filter.py +0 -0
  127. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/tests/unit/semantic_release/cli/test_version.py +0 -0
  128. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/tests/unit/semantic_release/commit_parser/__init__.py +0 -0
  129. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/tests/unit/semantic_release/commit_parser/test_angular.py +0 -0
  130. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/tests/unit/semantic_release/commit_parser/test_emoji.py +0 -0
  131. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/tests/unit/semantic_release/commit_parser/test_parsed_commit.py +0 -0
  132. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/tests/unit/semantic_release/commit_parser/test_scipy.py +0 -0
  133. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/tests/unit/semantic_release/commit_parser/test_tag.py +0 -0
  134. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/tests/unit/semantic_release/commit_parser/test_util.py +0 -0
  135. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/tests/unit/semantic_release/hvcs/__init__.py +0 -0
  136. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/tests/unit/semantic_release/hvcs/test_bitbucket.py +0 -0
  137. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/tests/unit/semantic_release/hvcs/test_gitea.py +0 -0
  138. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/tests/unit/semantic_release/hvcs/test_github.py +0 -0
  139. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/tests/unit/semantic_release/hvcs/test_gitlab.py +0 -0
  140. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/tests/unit/semantic_release/hvcs/test_token_auth.py +0 -0
  141. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/tests/unit/semantic_release/hvcs/test_util.py +0 -0
  142. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/tests/unit/semantic_release/test_helpers.py +0 -0
  143. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/tests/unit/semantic_release/version/__init__.py +0 -0
  144. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/tests/unit/semantic_release/version/test_algorithm.py +0 -0
  145. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/tests/unit/semantic_release/version/test_translator.py +0 -0
  146. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/tests/unit/semantic_release/version/test_version.py +0 -0
  147. {python_semantic_release-9.8.5 → python_semantic_release-9.8.7}/tests/util.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: python-semantic-release
3
- Version: 9.8.5
3
+ Version: 9.8.7
4
4
  Summary: Automatic Semantic Versioning for Python projects
5
5
  Author-email: Rolf Erik Lekang <me@rolflekang.com>
6
6
  License: MIT
@@ -41,17 +41,16 @@ Requires-Dist: sphinx-autobuild==2024.2.4; extra == "docs"
41
41
  Requires-Dist: furo~=2024.1; extra == "docs"
42
42
  Provides-Extra: test
43
43
  Requires-Dist: coverage[toml]~=7.0; extra == "test"
44
- Requires-Dist: pytest~=7.0; extra == "test"
44
+ Requires-Dist: pytest~=8.3; extra == "test"
45
45
  Requires-Dist: pytest-env~=1.0; extra == "test"
46
46
  Requires-Dist: pytest-xdist~=3.0; extra == "test"
47
47
  Requires-Dist: pytest-mock~=3.0; extra == "test"
48
- Requires-Dist: pytest-lazy-fixture~=0.6.3; extra == "test"
48
+ Requires-Dist: pytest-lazy-fixtures~=1.1.1; extra == "test"
49
49
  Requires-Dist: pytest-cov~=5.0; extra == "test"
50
50
  Requires-Dist: pytest-pretty~=1.2; extra == "test"
51
51
  Requires-Dist: pytest-clarity~=1.0; extra == "test"
52
52
  Requires-Dist: responses~=0.25.0; extra == "test"
53
53
  Requires-Dist: requests-mock~=1.10; extra == "test"
54
- Requires-Dist: types-pytest-lazy-fixture~=0.6.3; extra == "test"
55
54
  Provides-Extra: dev
56
55
  Requires-Dist: pre-commit~=3.5; extra == "dev"
57
56
  Requires-Dist: tox~=4.11; extra == "dev"
@@ -30,40 +30,42 @@ Example Workflow
30
30
 
31
31
  .. code:: yaml
32
32
 
33
- name: Semantic Release
34
-
35
- on:
36
- push:
37
- branches:
38
- - master
39
-
40
- jobs:
41
- release:
42
- runs-on: ubuntu-latest
43
- concurrency: release
44
- permissions:
45
- id-token: write
46
- contents: write
47
-
48
- steps:
49
- - uses: actions/checkout@v3
50
- with:
51
- fetch-depth: 0
52
-
53
- - name: Python Semantic Release
54
- uses: python-semantic-release/python-semantic-release@master
55
- with:
56
- github_token: ${{ secrets.GITHUB_TOKEN }}
57
-
58
- ``concurrency`` is a
59
- `beta feature of GitHub Actions <https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idconcurrency>`_
60
- which disallows two or more release jobs to run in parallel. This prevents race
61
- conditions if there are multiple pushes in a short period of time.
33
+ name: Semantic Release
34
+
35
+ on:
36
+ push:
37
+ branches:
38
+ - master
39
+
40
+ jobs:
41
+ release:
42
+ runs-on: ubuntu-latest
43
+ concurrency: release
44
+ permissions:
45
+ id-token: write
46
+ contents: write
47
+
48
+ steps:
49
+ - uses: actions/checkout@v3
50
+ with:
51
+ fetch-depth: 0
52
+
53
+ - name: Python Semantic Release
54
+ # Adjust tag with desired version if applicable. Version shorthand
55
+ # is NOT available, e.g. vX or vX.X will not work.
56
+ uses: python-semantic-release/python-semantic-release@v9.8.7
57
+ with:
58
+ github_token: ${{ secrets.GITHUB_TOKEN }}
59
+
60
+ ``concurrency`` is a `beta feature of GitHub Actions`_ which disallows two or more
61
+ release jobs to run in parallel. This prevents race conditions if there are multiple
62
+ pushes in a short period of time.
62
63
 
63
64
  If you would like to use Python Semantic Release to create GitHub Releases against
64
65
  your repository, you will need to allow the additional ``contents: write`` permission.
65
66
  More information can be found in the `permissions for GitHub Apps documentation`_
66
67
 
68
+ .. _beta feature of GitHub Actions: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idconcurrency
67
69
  .. _permissions for GitHub Apps documentation: https://docs.github.com/en/rest/overview/permissions-required-for-github-apps?apiVersion=2022-11-28#contents
68
70
 
69
71
  .. warning::
@@ -92,13 +94,13 @@ multiple projects.
92
94
  .. code:: yaml
93
95
 
94
96
  - name: Release Project 1
95
- uses: python-semantic-release/python-semantic-release@master
97
+ uses: python-semantic-release/python-semantic-release@v9.8.7
96
98
  with:
97
99
  directory: ./project1
98
100
  github_token: ${{ secrets.GITHUB_TOKEN }}
99
101
 
100
102
  - name: Release Project 2
101
- uses: python-semantic-release/python-semantic-release@master
103
+ uses: python-semantic-release/python-semantic-release@v9.8.7
102
104
  with:
103
105
  directory: ./project2
104
106
  github_token: ${{ secrets.GITHUB_TOKEN }}
@@ -3,22 +3,16 @@
3
3
  Changelog Templates
4
4
  ===================
5
5
 
6
- .. warning::
7
- If you have an existing changelog in the location you have configured with
8
- the :ref:`changelog_file <config-changelog-changelog_file>` setting,
9
- or if you have a template inside your :ref:`template directory <config-changelog-template_dir>`
10
- which will render to the location of an existing file, Python Semantic Release will
11
- overwrite the contents of this file.
12
-
13
- Please make sure to refer to :ref:`changelog-templates-migrating-existing-changelog`.
14
6
 
15
- Python Semantic Release can write a changelog for your project. By default, it uses an
16
- in-built template; once rendered this will be written to the location you configure with the
17
- :ref:`changelog_file <config-changelog-changelog_file>` setting.
7
+ By default, Python Semantic Release (PSR) will generate a changelog for your project. In the default
8
+ configuration, PSR will use a built-in template files to render the changelog at the file location
9
+ defined by the :ref:`changelog_file <config-changelog-changelog_file>` setting.
18
10
 
19
- However, Python Semantic Release is also capable of rendering an entire directory tree
20
- of templates during the changelog generation process. This directory is specified
21
- using the :ref:`template directory <config-changelog-template_dir>` setting.
11
+ However, you can customize the appearance and file structure of the changelog generation process
12
+ by creating your own template files. This option is available by setting the
13
+ :ref:`template_dir <config-changelog-template_dir>` configuration and populating the directory
14
+ with your custom template files. It will render the an entire directory tree of templates
15
+ as desired if they exist within the template directory.
22
16
 
23
17
  Python Semantic Release uses `Jinja`_ as its template engine, so you should refer to the
24
18
  `Template Designer Documentation`_ for guidance on how to customize the appearance of
@@ -32,6 +26,15 @@ providing the :ref:`--no-changelog <cmd-version-option-changelog>` command-line
32
26
 
33
27
  The changelog template is re-rendered on each release.
34
28
 
29
+ .. warning::
30
+ If you have an existing changelog in the location you have configured with
31
+ the :ref:`changelog_file <config-changelog-changelog_file>` setting,
32
+ or if you have a template inside your :ref:`template directory <config-changelog-template_dir>`
33
+ which will render to the location of an existing file, Python Semantic Release will
34
+ overwrite the contents of this file.
35
+
36
+ Please make sure to refer to :ref:`changelog-templates-migrating-existing-changelog`.
37
+
35
38
  .. _Jinja: https://jinja.palletsprojects.com/en/3.1.x/
36
39
  .. _Template Designer Documentation: https://jinja.palletsprojects.com/en/3.1.x/templates/
37
40
 
@@ -208,6 +208,7 @@ VIRTUAL_ENV Pass-through ``VIRTUAL_ENV`` if exists in process env,
208
208
  ======================== ======================================================================
209
209
 
210
210
  In addition, on windows systems these environment variables are passed:
211
+
211
212
  ======================== ======================================================================
212
213
  Variable Name Description
213
214
  ======================== ======================================================================
@@ -292,7 +293,12 @@ This section outlines the configuration options available that modify changelog
292
293
 
293
294
  **Type:** ``str``
294
295
 
295
- Specify the name of the changelog file (after template rendering has taken place).
296
+ Specify the name of the changelog file that will be created. This file will be created
297
+ or overwritten (if it previously exists) with the rendered default template included
298
+ with Python Semantic Release.
299
+
300
+ If you are using the ``template_dir`` setting for providing customized templates,
301
+ this setting is not used. See :ref:`config-changelog-template_dir` for more information.
296
302
 
297
303
  **Default:** ``"CHANGELOG.md"``
298
304
 
@@ -309,15 +315,14 @@ Specify the name of the changelog file (after template rendering has taken place
309
315
  passed directly to the `jinja2.Environment`_ constructor, and further
310
316
  documentation one these parameters can be found there.
311
317
 
312
- .. _`jinja2.Environment`: https://jinja.palletsprojects.com/en/3.1.x/api/#jinja2.Environment
313
-
314
- .. note::
315
318
  **pyproject.toml:** ``[tool.semantic_release.changelog.environment]``
316
319
 
317
320
  **releaserc.toml:** ``[semantic_release.changelog.environment]``
318
321
 
319
322
  **releaserc.json:** ``{ "semantic_release": { "changelog": { "environment": {} } } }``
320
323
 
324
+ .. _`jinja2.Environment`: https://jinja.palletsprojects.com/en/3.1.x/api/#jinja2.Environment
325
+
321
326
  ----
322
327
 
323
328
  .. _config-changelog-environment-autoescape:
@@ -540,8 +545,14 @@ The patterns in this list are treated as regular expressions.
540
545
 
541
546
  **Type:** ``str``
542
547
 
543
- If given, specifies a directory of templates that will be rendered during creation
544
- of the changelog. If not given, the default changelog template will be used.
548
+ When files exist within the specified directory, they will be used as templates for
549
+ the changelog rendering process. Regardless if the directory includes a changelog file,
550
+ the provided directory will be rendered and files placed relative to the root of the
551
+ project directory.
552
+
553
+ No default changelog template or release notes template will be used when this directory
554
+ exists and the directory is not empty. If the directory is empty, the default changelog
555
+ template will be used.
545
556
 
546
557
  This option is discussed in more detail at :ref:`changelog-templates`
547
558
 
@@ -561,7 +572,7 @@ Author used in commits in the format ``name <email>``.
561
572
  .. note::
562
573
  If you are using the built-in GitHub Action, the default value is set to
563
574
  ``github-actions <actions@github.com>``. You can modify this with the
564
- ``git_committer_name`` and ``git_committer_name`` inputs.
575
+ ``git_committer_name`` and ``git_committer_email`` inputs.
565
576
 
566
577
  .. seealso::
567
578
  - :ref:`github-actions`
@@ -129,7 +129,9 @@ provide the following inputs:
129
129
 
130
130
  # ... the rest of the workflow
131
131
  - name: Python Semantic Release
132
- uses: python-semantic-release/python-semantic-release@v8.0.0
132
+ # Adjust tag with desired version if applicable. Version shorthand
133
+ # is NOT available, e.g. vX or vX.X will not work.
134
+ uses: python-semantic-release/python-semantic-release@v9.8.7
133
135
  with:
134
136
  # ... other options
135
137
  force: "patch"
@@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
6
6
 
7
7
  [project]
8
8
  name = "python-semantic-release"
9
- version = "9.8.5"
9
+ version = "9.8.7"
10
10
  description = "Automatic Semantic Versioning for Python projects"
11
11
  requires-python = ">=3.8"
12
12
  license = { text = "MIT" }
@@ -59,17 +59,16 @@ docs = [
59
59
  ]
60
60
  test = [
61
61
  "coverage[toml] ~= 7.0",
62
- "pytest ~= 7.0",
62
+ "pytest ~= 8.3",
63
63
  "pytest-env ~= 1.0",
64
64
  "pytest-xdist ~= 3.0",
65
65
  "pytest-mock ~= 3.0",
66
- "pytest-lazy-fixture ~= 0.6.3",
66
+ "pytest-lazy-fixtures ~= 1.1.1",
67
67
  "pytest-cov ~= 5.0",
68
68
  "pytest-pretty ~= 1.2",
69
69
  "pytest-clarity ~= 1.0",
70
70
  "responses ~= 0.25.0",
71
71
  "requests-mock ~= 1.10",
72
- "types-pytest-lazy-fixture ~= 0.6.3",
73
72
  ]
74
73
  dev = [
75
74
  "pre-commit ~= 3.5",
@@ -376,6 +375,7 @@ ignore_names = ["change_to_ex_proj_dir", "init_example_project"]
376
375
  logging_use_named_masks = true
377
376
  commit_parser = "angular"
378
377
  build_command = """
378
+ python -m scripts.bump_version_in_docs
379
379
  python -m pip install -e .[build]
380
380
  python -m build .
381
381
  """
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: python-semantic-release
3
- Version: 9.8.5
3
+ Version: 9.8.7
4
4
  Summary: Automatic Semantic Versioning for Python projects
5
5
  Author-email: Rolf Erik Lekang <me@rolflekang.com>
6
6
  License: MIT
@@ -41,17 +41,16 @@ Requires-Dist: sphinx-autobuild==2024.2.4; extra == "docs"
41
41
  Requires-Dist: furo~=2024.1; extra == "docs"
42
42
  Provides-Extra: test
43
43
  Requires-Dist: coverage[toml]~=7.0; extra == "test"
44
- Requires-Dist: pytest~=7.0; extra == "test"
44
+ Requires-Dist: pytest~=8.3; extra == "test"
45
45
  Requires-Dist: pytest-env~=1.0; extra == "test"
46
46
  Requires-Dist: pytest-xdist~=3.0; extra == "test"
47
47
  Requires-Dist: pytest-mock~=3.0; extra == "test"
48
- Requires-Dist: pytest-lazy-fixture~=0.6.3; extra == "test"
48
+ Requires-Dist: pytest-lazy-fixtures~=1.1.1; extra == "test"
49
49
  Requires-Dist: pytest-cov~=5.0; extra == "test"
50
50
  Requires-Dist: pytest-pretty~=1.2; extra == "test"
51
51
  Requires-Dist: pytest-clarity~=1.0; extra == "test"
52
52
  Requires-Dist: responses~=0.25.0; extra == "test"
53
53
  Requires-Dist: requests-mock~=1.10; extra == "test"
54
- Requires-Dist: types-pytest-lazy-fixture~=0.6.3; extra == "test"
55
54
  Provides-Extra: dev
56
55
  Requires-Dist: pre-commit~=3.5; extra == "dev"
57
56
  Requires-Dist: tox~=4.11; extra == "dev"
@@ -31,14 +31,13 @@ types-requests~=2.32.0
31
31
 
32
32
  [test]
33
33
  coverage[toml]~=7.0
34
- pytest~=7.0
34
+ pytest~=8.3
35
35
  pytest-env~=1.0
36
36
  pytest-xdist~=3.0
37
37
  pytest-mock~=3.0
38
- pytest-lazy-fixture~=0.6.3
38
+ pytest-lazy-fixtures~=1.1.1
39
39
  pytest-cov~=5.0
40
40
  pytest-pretty~=1.2
41
41
  pytest-clarity~=1.0
42
42
  responses~=0.25.0
43
43
  requests-mock~=1.10
44
- types-pytest-lazy-fixture~=0.6.3
@@ -24,7 +24,7 @@ from semantic_release.version import (
24
24
  tags_and_versions,
25
25
  )
26
26
 
27
- __version__ = "9.8.5"
27
+ __version__ = "9.8.7"
28
28
 
29
29
  __all__ = [
30
30
  "CommitParser",
@@ -149,6 +149,7 @@ def generate_release_notes(
149
149
  hvcs_client: HvcsBase,
150
150
  release: Release,
151
151
  template_dir: Path,
152
+ history: ReleaseHistory,
152
153
  ) -> str:
153
154
  release_notes_env = ReleaseNotesContext(
154
155
  repo_name=hvcs_client.repo_name,
@@ -163,6 +164,11 @@ def generate_release_notes(
163
164
  environment(template_dir=template_dir)
164
165
  )
165
166
 
167
+ # TODO: Remove in v10
168
+ release_notes_env.globals["context"] = {
169
+ "history": history,
170
+ }
171
+
166
172
  return render_release_notes(
167
173
  release_notes_template=get_release_notes_template(template_dir),
168
174
  template_env=release_notes_env,
@@ -34,7 +34,9 @@ def post_release_notes(
34
34
  "\n",
35
35
  [
36
36
  f"would have posted the following release notes for tag {release_tag}:",
37
- release_notes,
37
+ # Escape square brackets to ensure all content is displayed in the console
38
+ # (i.e. prevent interpretation of ansi escape sequences that is valid markdown)
39
+ release_notes.replace("[", "\\["),
38
40
  ],
39
41
  )
40
42
  )
@@ -112,7 +114,8 @@ def changelog(cli_ctx: CliContextObj, release_tag: str | None) -> None:
112
114
  release_notes = generate_release_notes(
113
115
  hvcs_client,
114
116
  release,
115
- template_dir=runtime.template_dir,
117
+ runtime.template_dir,
118
+ release_history,
116
119
  )
117
120
 
118
121
  try:
@@ -4,6 +4,7 @@ import logging
4
4
  import os
5
5
  import subprocess
6
6
  import sys
7
+ from collections import defaultdict
7
8
  from datetime import datetime
8
9
  from typing import TYPE_CHECKING
9
10
 
@@ -160,8 +161,17 @@ def shell(
160
161
  if not shell:
161
162
  raise TypeError("'shell' is None")
162
163
 
164
+ shell_cmd_param = defaultdict(
165
+ lambda: "-c",
166
+ {
167
+ "cmd": "/c",
168
+ "powershell": "-Command",
169
+ "pwsh": "-Command",
170
+ },
171
+ )
172
+
163
173
  return subprocess.run( # noqa: S603
164
- [shell, "-c" if shell != "cmd" else "/c", cmd],
174
+ [shell, shell_cmd_param[shell], cmd],
165
175
  env=(env or {}),
166
176
  check=check,
167
177
  )
@@ -701,7 +711,8 @@ def version( # noqa: C901
701
711
  release_notes = generate_release_notes(
702
712
  hvcs_client,
703
713
  release_history.released[new_version],
704
- template_dir=runtime.template_dir,
714
+ runtime.template_dir,
715
+ history=release_history,
705
716
  )
706
717
 
707
718
  exception: Exception | None = None
@@ -8,7 +8,7 @@ from unittest import mock
8
8
 
9
9
  import pytest
10
10
  import requests_mock
11
- from pytest_lazyfixture import lazy_fixture
11
+ from pytest_lazy_fixtures.lazy_fixture import lf as lazy_fixture
12
12
  from requests import Session
13
13
 
14
14
  from semantic_release.cli.commands.main import main
@@ -13,7 +13,7 @@ from unittest import mock
13
13
 
14
14
  import pytest
15
15
  import tomlkit
16
- from pytest_lazyfixture import lazy_fixture
16
+ from pytest_lazy_fixtures.lazy_fixture import lf as lazy_fixture
17
17
 
18
18
  from semantic_release.cli.commands.main import main
19
19
  from semantic_release.hvcs.github import Github
@@ -658,7 +658,7 @@ def test_version_version_no_verify(
658
658
  assert head_before in repo_with_single_branch_angular_commits.head.commit.parents
659
659
 
660
660
 
661
- @pytest.mark.parametrize("shell", ("/usr/bin/bash", "/usr/bin/zsh", "powershell"))
661
+ @pytest.mark.parametrize("shell", ("/usr/bin/bash", "/usr/bin/zsh"))
662
662
  def test_version_runs_build_command(
663
663
  repo_with_git_flow_angular_commits: Repo,
664
664
  cli_runner: CliRunner,
@@ -739,7 +739,7 @@ def test_version_runs_build_command(
739
739
  )
740
740
 
741
741
 
742
- @pytest.mark.parametrize("shell", ("powershell", "cmd"))
742
+ @pytest.mark.parametrize("shell", ("powershell", "pwsh", "cmd"))
743
743
  def test_version_runs_build_command_windows(
744
744
  repo_with_git_flow_angular_commits: Repo,
745
745
  cli_runner: CliRunner,
@@ -801,7 +801,7 @@ def test_version_runs_build_command_windows(
801
801
  # Evaluate
802
802
  assert_successful_exit_code(result, cli_cmd)
803
803
  patched_subprocess_run.assert_called_once_with(
804
- [exe, "-c" if shell != "cmd" else "/c", build_command],
804
+ [exe, "/c" if shell == "cmd" else "-Command", build_command],
805
805
  check=True,
806
806
  env={
807
807
  "NEW_VERSION": "1.2.1", # injected into environment
@@ -5,7 +5,7 @@ from typing import TYPE_CHECKING
5
5
  import pytest
6
6
 
7
7
  # Limitation in pytest-lazy-fixture - see https://stackoverflow.com/a/69884019
8
- from pytest_lazyfixture import lazy_fixture
8
+ from pytest_lazy_fixtures.lazy_fixture import lf as lazy_fixture
9
9
 
10
10
  from semantic_release.version.algorithm import next_version
11
11
  from semantic_release.version.translator import VersionTranslator
@@ -5,7 +5,7 @@ from typing import NamedTuple
5
5
 
6
6
  import pytest
7
7
  from git import Actor
8
- from pytest_lazyfixture import lazy_fixture
8
+ from pytest_lazy_fixtures.lazy_fixture import lf as lazy_fixture
9
9
 
10
10
  from semantic_release.changelog.release_history import ReleaseHistory
11
11
  from semantic_release.version.translator import VersionTranslator
@@ -4,7 +4,7 @@ import json
4
4
  from textwrap import dedent
5
5
 
6
6
  import pytest
7
- from pytest_lazyfixture import lazy_fixture
7
+ from pytest_lazy_fixtures.lazy_fixture import lf as lazy_fixture
8
8
 
9
9
  from semantic_release.cli.util import load_raw_config_file, parse_toml
10
10
  from semantic_release.errors import InvalidConfiguration
@@ -3,7 +3,7 @@ from __future__ import annotations
3
3
  from typing import TYPE_CHECKING
4
4
 
5
5
  import pytest
6
- from pytest_lazyfixture import lazy_fixture
6
+ from pytest_lazy_fixtures.lazy_fixture import lf as lazy_fixture
7
7
 
8
8
  from semantic_release.hvcs._base import HvcsBase
9
9
 
@@ -4,7 +4,7 @@ from textwrap import dedent
4
4
  from unittest import mock
5
5
 
6
6
  import pytest
7
- from pytest_lazyfixture import lazy_fixture
7
+ from pytest_lazy_fixtures.lazy_fixture import lf as lazy_fixture
8
8
 
9
9
  from semantic_release.version.declaration import (
10
10
  PatternVersionDeclaration,