From e70325e2ad41fb16d33f0dfc179955a3c5d38604 Mon Sep 17 00:00:00 2001 From: codejedi365 Date: Sun, 25 May 2025 03:46:51 -0600 Subject: [PATCH 01/14] chore(changelog): update changelog spelling, links, & shorten breaking change descriptions (#1254) * chore(docs): fix references within docs --- CHANGELOG.rst | 193 +++++------------- docs/api/commands.rst | 2 +- .../automatic-releases/travis.rst | 2 +- 3 files changed, 54 insertions(+), 143 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 61fa77784..ec7decbe1 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -89,7 +89,7 @@ v10.0.0 (2025-05-25) * **github-actions**: Update ``python-semantic-release/publish-action`` parameter notes (`c4d45ec`_) -* **github-actions**: Update PSR action parameter documenation (`a082896`_) +* **github-actions**: Update PSR action parameter documentation (`a082896`_) * **upgrading**: Re-locate version upgrade guides into ``Upgrading PSR`` (`a5f5e04`_) @@ -164,13 +164,14 @@ v10.0.0 (2025-05-25) configuration. * **github-action**: The ``root_options`` action input parameter has been removed because it created - a command injection vulernability for arbitrary code to execute within the container context of + a command injection vulnerability for arbitrary code to execute within the container context of the GitHub action if a command injection code was provided as part of the ``root_options`` parameter string. To eliminate the vulnerability, each relevant option that can be provided to ``semantic-release`` has been individually added as its own parameter and will be processed individually to prevent command injection. Please review our `Github Actions Configuration`__ page - on the Python Semantic Release Documentation website to review the newly available configuration - options that replace the ``root_options`` parameter. + to review the newly available configuration options that replace the ``root_options`` parameter. + + __ https://github.com/python-semantic-release/python-semantic-release/blob/v10.0.0/docs/configuration/automatic-releases/github-actions.rst * **parser-conventional**: Any breaking change footer messages that the conventional commit parser detects will now be removed from the ``commit.descriptions[]`` list but maintained in and only in @@ -178,146 +179,56 @@ v10.0.0 (2025-05-25) the commit message but that was redundant as the default changelog now handles breaking change footers in its own section. -* **parser-conventional**: Any issue resolution footers that the parser detects will now be removed - from the ``commit.descriptions[]`` list. Previously, the descriptions included all text from the - commit message but now that the parser pulls out the issue numbers the numbers will be included in - the ``commit.linked_issues`` tuple for user extraction in any changelog generation. - -* **parser-conventional**: Any release notice footer messages that the commit parser detects will - now be removed from the ``commit.descriptions[]`` list but maintained in and only in the - ``commit.notices[]`` list. Previously, the descriptions included all text from the commit message - but that was redundant as the default changelog now handles release notice footers in its own - section. - -* **parser-conventional**: Generally, a pull request or merge request number reference is included - in the subject line at the end within parentheses on some common VCS's like GitHub. PSR now looks - for this reference and extracts it into the ``commit.linked_merge_request`` and the - ``commit.linked_pull_request`` attributes of a commit object. Since this is now pulled out - individually, it is cleaner to remove this from the first line of the ``commit.descriptions`` list - (ie. the subject line) so that changelog macros do not have to replace the text but instead only - append a PR/MR link to the end of the line. The reference does maintain the PR/MR prefix indicator - (`#` or ``!``). - -* **parser-conventional**: The configuration setting ``commit_parser_options.ignore_merge_commits`` - is now set to ``true`` by default. The feature to ignore squash commits was introduced in - ``v9.18.0`` and was originally set to ``false`` to prevent unexpected results on a non-breaking - update. The ignore merge commits feature prevents additional unnecessary processing on a commit - message that likely will not match a commit message syntax. Most merge commits are syntactically - pre-defined by Git or Remote Version Control System (ex. GitHub, etc.) and do not follow a commit - convention (nor should they). The larger issue with merge commits is that they ultimately are a - full copy of all the changes that were previously created and committed. The merge commit itself - ensures that the previous commit tree is maintained in history, therefore the commit message - always exists. If merge commits are parsed, it generally creates duplicate messages that will end - up in your changelog, which is less than desired in most cases. If you have previously used the - ``changelog.exclude_commit_patterns`` functionality to ignore merge commit messages then you will - want this setting set to ``true`` to improve parsing speed. You can also now remove the merge - commit exclude pattern from the list as well to improve parsing speed. If this functionality is - not desired, you will need to update your configuration to change the new setting to ``false``. - -* **parser-conventional**: The configuration setting ``commit_parser_options.parse_squash_commits`` - is now set to ``true`` by default. The feature to parse squash commits was introduced in - ``v9.17.0`` and was originally set to ``false`` to prevent unexpected results on a non-breaking - update. The parse squash commits feature attempts to find additional commits of the same commit - type within the body of a single commit message. When squash commits are found, Python Semantic - Release will separate out each commit into its own artificial commit object and parse them - individually. This potentially can change the resulting version bump if a larger bump was detected - within the squashed components. It also allows for the changelog and release notes to separately - order and display each commit as originally written. If this is not desired, you will need to - update your configuration to change the new setting to ``false``. - -* **parser-emoji**: Any issue resolution footers that the parser detects will now be removed from - the ``commit.descriptions[]`` list. Previously, the descriptions included all text from the commit - message but now that the parser pulls out the issue numbers the numbers will be included in the - ``commit.linked_issues`` tuple for user extraction in any changelog generation. - -* **parser-emoji**: Any release notice footer messages that the emoji commit parser detects will now - be removed from the ``commit.descriptions[]`` list but maintained in and only in the - ``commit.notices[]`` list. Previously, the descriptions included all text from the commit message - but that was redundant as the default changelog now handles release notice footers in its own - section. - -* **parser-emoji**: Generally, a pull request or merge request number reference is included in the - subject line at the end within parentheses on some common VCS's (e.g. GitHub). PSR now looks for - these references and extract it into the ``commit.linked_merge_request`` field of a commit object. - Since this is now pulled out individually, it is cleaner to remove this from the first line of the - ``commit.descriptions`` list (ie. the subject line) so that changelog macros do not have to - replace the text but instead only append a PR/MR link to the end of the line. The reference will - maintain the PR/MR prefix indicator (e.g. ``#`` or ``!``). - -* **parser-emoji**: The configuration setting ``commit_parser_options.ignore_merge_commits`` is now - set to ``true`` by default. The feature to ignore squash commits was introduced in ``v9.18.0`` and - was originally set to ``false`` to prevent unexpected results on a non-breaking update. The ignore - merge commits feature prevents additional unnecessary processing on a commit message that likely - will not match a commit message syntax. Most merge commits are syntactically pre-defined by Git or - Remote Version Control System (ex. GitHub, etc.) and do not follow a commit convention (nor should - they). The larger issue with merge commits is that they ultimately are a full copy of all the - changes that were previously created and committed. The merge commit itself ensures that the - previous commit tree is maintained in history, therefore the commit message always exists. If - merge commits are parsed, it generally creates duplicate messages that will end up in your - changelog, which is less than desired in most cases. If you have previously used the - ``changelog.exclude_commit_patterns`` functionality to ignore merge commit messages then you will - want this setting set to ``true`` to improve parsing speed. You can also now remove the merge - commit exclude pattern from the list as well to improve parsing speed. If this functionality is - not desired, you will need to update your configuration to change the new setting to ``false``. - -* **parser-emoji**: The configuration setting ``commit_parser_options.parse_squash_commits`` is now - set to ``true`` by default. The feature to parse squash commits was introduced in ``v9.17.0`` and - was originally set to ``false`` to prevent unexpected results on a non-breaking update. The parse - squash commits feature attempts to find additional commits of the same commit type within the body - of a single commit message. When squash commits are found, Python Semantic Release will separate - out each commit into its own artificial commit object and parse them individually. This - potentially can change the resulting version bump if a larger bump was detected within the - squashed components. It also allows for the changelog and release notes to separately order and - display each commit as originally written. If this is not desired, you will need to update your - configuration to change the new setting to ``false``. +* **parser-conventional, parser-emoji, parser-scipy**: Any issue resolution footers that the parser + detects will now be removed from the ``commit.descriptions[]`` list. Previously, the descriptions + included all text from the commit message but now that the parser pulls out the issue numbers the + numbers will be included in the ``commit.linked_issues`` tuple for user extraction in any + changelog generation. -* **parser-scipy**: Any issue resolution footers that the parser detects will now be removed from - the commit.descriptions[] list. Previously, the descriptions included all text from the commit - message but now that the parser pulls out the issue numbers the numbers will be included in the - commit.linked_issues tuple for user extraction in any changelog generation. - -* **parser-scipy**: Any release notice footer messages that the commit parser detects will now be - removed from the ``commit.descriptions[]`` list but maintained in and only in the - ``commit.notices[]`` list. Previously, the descriptions included all text from the commit message - but that was redundant as the default changelog now handles release notice footers in its own - section. - -* **parser-scipy**: Generally, a pull request or merge request number reference is included in the - subject line at the end within parentheses on some common VCS's like GitHub. PSR now looks for - this reference and extracts it into the ``commit.linked_merge_request`` and the - ``commit.linked_pull_request`` attributes of a commit object. Since this is now pulled out - individually, it is cleaner to remove this from the first line of the ``commit.descriptions`` list - (ie. the subject line) so that changelog macros do not have to replace the text but instead only - append a PR/MR link to the end of the line. The reference does maintain the PR/MR prefix indicator - (`#` or ``!``). - -* **parser-scipy**: The configuration setting ``commit_parser_options.ignore_merge_commits`` is now - set to ``true`` by default. The feature to ignore squash commits was introduced in ``v9.18.0`` and - was originally set to ``false`` to prevent unexpected results on a non-breaking update. The ignore - merge commits feature prevents additional unnecessary processing on a commit message that likely - will not match a commit message syntax. Most merge commits are syntactically pre-defined by Git or - Remote Version Control System (ex. GitHub, etc.) and do not follow a commit convention (nor should - they). The larger issue with merge commits is that they ultimately are a full copy of all the - changes that were previously created and committed. The merge commit itself ensures that the - previous commit tree is maintained in history, therefore the commit message always exists. If - merge commits are parsed, it generally creates duplicate messages that will end up in your - changelog, which is less than desired in most cases. If you have previously used the - ``changelog.exclude_commit_patterns`` functionality to ignore merge commit messages then you will - want this setting set to ``true`` to improve parsing speed. You can also now remove the merge - commit exclude pattern from the list as well to improve parsing speed. If this functionality is - not desired, you will need to update your configuration to change the new setting to ``false``. - -* **parser-scipy**: The configuration setting ``commit_parser_options.parse_squash_commits`` is now - set to ``true`` by default. The feature to parse squash commits was introduced in ``v9.17.0`` and - was originally set to ``false`` to prevent unexpected results on a non-breaking update. The parse - squash commits feature attempts to find additional commits of the same commit type within the body - of a single commit message. When squash commits are found, Python Semantic Release will separate - out each commit into its own artificial commit object and parse them individually. This - potentially can change the resulting version bump if a larger bump was detected within the - squashed components. It also allows for the changelog and release notes to separately order and - display each commit as originally written. If this is not desired, you will need to update your +* **parser-conventional, parser-emoji, parser-scipy**: Any release notice footer messages that the + commit parser detects will now be removed from the ``commit.descriptions[]`` list but maintained + in and only in the ``commit.notices[]`` list. Previously, the descriptions included all text from + the commit message but that was redundant as the default changelog now handles release notice + footers in its own section. + +* **parser-conventional, parser-emoji, parser-scipy**: Generally, a pull request or merge request + number reference is included in the subject line at the end within parentheses on some common + VCS's like GitHub. PSR now looks for this reference and extracts it into the + ``commit.linked_merge_request`` and the ``commit.linked_pull_request`` attributes of a commit + object. Since this is now pulled out individually, it is cleaner to remove this from the first + line of the ``commit.descriptions`` list (ie. the subject line) so that changelog macros do not + have to replace the text but instead only append a PR/MR link to the end of the line. The + reference does maintain the PR/MR prefix indicator (`#` or ``!``). + +* **parser-conventional, parser-emoji, parser-scipy**: The configuration setting + ``commit_parser_options.ignore_merge_commits`` is now set to ``true`` by default. The feature to + ignore squash commits was introduced in ``v9.18.0`` and was originally set to ``false`` to + prevent unexpected results on a non-breaking update. The ignore merge commits feature prevents + additional unnecessary processing on a commit message that likely will not match a commit message + syntax. Most merge commits are syntactically pre-defined by Git or Remote Version Control System + (ex. GitHub, etc.) and do not follow a commit convention (nor should they). The larger issue with + merge commits is that they ultimately are a full copy of all the changes that were previously + created and committed. The merge commit itself ensures that the previous commit tree is + maintained in history, therefore the commit message always exists. If merge commits are parsed, + it generally creates duplicate messages that will end up in your changelog, which is less than + desired in most cases. If you have previously used the ``changelog.exclude_commit_patterns`` + functionality to ignore merge commit messages then you will want this setting set to ``true`` to + improve parsing speed. You can also now remove the merge commit exclude pattern from the list as + well to improve parsing speed. If this functionality is not desired, you will need to update your configuration to change the new setting to ``false``. +* **parser-conventional, parser-emoji, parser-scipy**: The configuration setting + ``commit_parser_options.parse_squash_commits`` is now set to ``true`` by default. The feature to + parse squash commits was introduced in ``v9.17.0`` and was originally set to ``false`` to prevent + unexpected results on a non-breaking update. The parse squash commits feature attempts to find + additional commits of the same commit type within the body of a single commit message. When + squash commits are found, Python Semantic Release will separate out each commit into its own + artificial commit object and parse them individually. This potentially can change the resulting + version bump if a larger bump was detected within the squashed components. It also allows for the + changelog and release notes to separately order and display each commit as originally written. If + this is not desired, you will need to update your configuration to change the new setting to + ``false``. + .. _#733: https://github.com/python-semantic-release/python-semantic-release/issues/733 .. _080e4bc: https://github.com/python-semantic-release/python-semantic-release/commit/080e4bcb14048a2dd10445546a7ee3159b3ab85c .. _0bed906: https://github.com/python-semantic-release/python-semantic-release/commit/0bed9069df67ae806ad0a15f8434ac4efcc6ba31 diff --git a/docs/api/commands.rst b/docs/api/commands.rst index d99a40152..344c7f5f4 100644 --- a/docs/api/commands.rst +++ b/docs/api/commands.rst @@ -496,4 +496,4 @@ corresponding release is found in the remote VCS, then Python Semantic Release w attempt to create one. If using this option, the relevant authentication token *must* be supplied via the -relevant environment variable. For more information, see :ref:`index-creating-vcs-releases`. +relevant environment variable. diff --git a/docs/configuration/automatic-releases/travis.rst b/docs/configuration/automatic-releases/travis.rst index 5be380975..60ee68ce8 100644 --- a/docs/configuration/automatic-releases/travis.rst +++ b/docs/configuration/automatic-releases/travis.rst @@ -18,7 +18,7 @@ You will need to set up an environment variable in Travis. An easy way to do tha is to go to the settings page for your package and add it there. Make sure that the secret toggle is set correctly. -You need to set the :ref:`GH_TOKEN ` environment +You need to set the :ref:`GH_TOKEN ` environment variable with a personal access token for Github. It will need either ``repo`` or ``public_repo`` scope depending on whether the repository is private or public. From bba903ce21306059aebc5c0e8cd4e677a808ff7e Mon Sep 17 00:00:00 2001 From: codejedi365 Date: Sun, 25 May 2025 03:34:06 -0600 Subject: [PATCH 02/14] ci(deps): bump `python-semantic-release@v9.21.0` action to `v10.0.0` --- .github/workflows/cicd.yml | 4 ++-- .github/workflows/validate.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index 358dff3ab..2dc956b73 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -145,10 +145,10 @@ jobs: - name: Release | Python Semantic Release id: release - uses: python-semantic-release/python-semantic-release@v9.21.1 + uses: python-semantic-release/python-semantic-release@092ace20f4ebed6a656da54b499076f1a5b803c8 # v10.0.0 with: github_token: ${{ secrets.GITHUB_TOKEN }} - root_options: "-v" + verbosity: 1 build: false - name: Release | Add distribution artifacts to GitHub Release Assets diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index a55e468fd..1e93ff0d6 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -112,10 +112,10 @@ jobs: - name: Build | Build next version artifacts id: version - uses: python-semantic-release/python-semantic-release@v9.21.1 + uses: python-semantic-release/python-semantic-release@092ace20f4ebed6a656da54b499076f1a5b803c8 # v10.0.0 with: github_token: "" - root_options: "-v" + verbosity: 1 build: true changelog: true commit: false From 96a9503d4e33bb23290760c79e341f60dd767761 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 25 May 2025 09:17:03 +0000 Subject: [PATCH 03/14] ci(deps): bump `python-semantic-release/publish-action@v9.21.1` to `v10.0.0` --- .github/workflows/cicd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index 2dc956b73..8c8b45c45 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -152,7 +152,7 @@ jobs: build: false - name: Release | Add distribution artifacts to GitHub Release Assets - uses: python-semantic-release/publish-action@v9.21.1 + uses: python-semantic-release/publish-action@d62706ce15a7c98325c51a3e5cc789fdbe843e5a # v10.0.0 if: steps.release.outputs.released == 'true' with: github_token: ${{ secrets.GITHUB_TOKEN }} From 2803676cf26c52177fa98d9144934853744a22bb Mon Sep 17 00:00:00 2001 From: codejedi365 Date: Sun, 25 May 2025 03:53:27 -0600 Subject: [PATCH 04/14] fix(github-actions): bump the github-actions dependency to `v10.0.0` (#1255) --- src/gh_action/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gh_action/requirements.txt b/src/gh_action/requirements.txt index 1aae03384..2fabec60d 100644 --- a/src/gh_action/requirements.txt +++ b/src/gh_action/requirements.txt @@ -1 +1 @@ -python-semantic-release == 9.21.1 +python-semantic-release == 10.0.0 From 22fd6792e9de082f2769abf1069ac62250ff33a0 Mon Sep 17 00:00:00 2001 From: codejedi365 Date: Sat, 17 May 2025 16:45:12 -0600 Subject: [PATCH 05/14] chore(changelog): update PSR template after v10 strips PR numbers from subject lines --- config/release-templates/.components/macros.md.j2 | 11 +++++------ config/release-templates/.components/macros.rst.j2 | 5 +---- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/config/release-templates/.components/macros.md.j2 b/config/release-templates/.components/macros.md.j2 index 7332fc741..89cd84cb2 100644 --- a/config/release-templates/.components/macros.md.j2 +++ b/config/release-templates/.components/macros.md.j2 @@ -58,13 +58,12 @@ ) %}{# #}{% if commit.linked_merge_request != "" -%}{% set pr_num = commit.linked_merge_request -%}{# # TODO: breaking change v10, remove summary line replacers as PSR will do it for us -#}{% set summary_line = summary_line | replace("(pull request ", "(") | replace("(" ~ pr_num ~ ")", "") | trim -%}{# - # # Add PR references with a link to the PR +%}{# # Add PR references with a link to the PR #}{% set _ = link_references.append( - format_link(pr_num | pull_request_url, "PR" ~ pr_num) + format_link( + commit.linked_merge_request | pull_request_url, + "PR" ~ commit.linked_merge_request + ) ) %}{% endif %}{# diff --git a/config/release-templates/.components/macros.rst.j2 b/config/release-templates/.components/macros.rst.j2 index a0621c252..779571c02 100644 --- a/config/release-templates/.components/macros.rst.j2 +++ b/config/release-templates/.components/macros.rst.j2 @@ -131,10 +131,7 @@ %}{% endif %}{# #}{% if commit.linked_merge_request != "" -%}{# # TODO: breaking change v10, remove summary line replacers as PSR will do it for us -#}{% set summary_line = summary_line | replace("(pull request ", "(") | replace("(" ~ commit.linked_merge_request ~ ")", "") | trim -%}{# - # # Add PR references with a link to the PR +%}{# # Add PR references with a link to the PR #}{% set _ = link_references.append("`PR%s`_" | format(commit.linked_merge_request)) %}{% endif %}{# From 74192b4ff4c7e7e5f0b577e482b9e564514d3be2 Mon Sep 17 00:00:00 2001 From: codejedi365 Date: Sun, 25 May 2025 11:01:44 -0600 Subject: [PATCH 06/14] chore(changelog): update changelog with latest template change --- CHANGELOG.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index ec7decbe1..bdf5c855b 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -420,7 +420,7 @@ v9.19.0 (2025-02-10) * Update references to Angular parser to Conventional Commit Parser (`PR#1177`_, `27ddf84`_) -💡 ADDITIONAL RELEASE INFORMATION +💡 Additional Release Information --------------------------------- * **parser-conventional**: The 'angular' commit parser has been renamed to 'conventional' to match From ceca7615915411ba843c14db135f5fac79fa8afc Mon Sep 17 00:00:00 2001 From: codejedi365 Date: Sun, 25 May 2025 11:31:05 -0600 Subject: [PATCH 07/14] chore(changelog): add reference to the v10 migration guide --- CHANGELOG.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index bdf5c855b..c2f11439b 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -113,6 +113,12 @@ v10.0.0 (2025-05-25) 💥 Breaking Changes ------------------- +.. seealso:: + *For a summarized walkthrough, check out our* |v10 migration guide|_ *as well.* + +.. _v10 migration guide: ../upgrading/10-upgrade.html +.. |v10 migration guide| replace:: *v10 migration guide* + * **changelog-md**: The default Markdown changelog template and release notes template will no longer print out the entire commit message contents, instead, it will only print the commit subject line. This comes to meet the high demand of better formatted changelogs and requests for From 613640fd2cae3a90203537bcaed0077721d8dd76 Mon Sep 17 00:00:00 2001 From: codejedi365 Date: Sun, 25 May 2025 11:52:33 -0600 Subject: [PATCH 08/14] chore(release-notes): update templates to support `first_release` creation --- .../.components/first_release.md.j2 | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 config/release-templates/.components/first_release.md.j2 diff --git a/config/release-templates/.components/first_release.md.j2 b/config/release-templates/.components/first_release.md.j2 new file mode 100644 index 000000000..d0e44f7cc --- /dev/null +++ b/config/release-templates/.components/first_release.md.j2 @@ -0,0 +1,18 @@ +{# EXAMPLE: + +## vX.X.X (YYYY-MMM-DD) + +_This release is published under the MIT License._ # Release Notes Only + +- Initial Release + +#}{{ +"## %s (%s)\n" | format( + release.version.as_semver_tag(), + release.tagged_date.strftime("%Y-%m-%d") +) +}}{% if license_name is defined and license_name +%}{{ "\n_This release is published under the %s License._\n" | format(license_name) +}}{% endif +%} +- Initial Release From d099c20aad32201f1609a35765ca26f6562f4c6e Mon Sep 17 00:00:00 2001 From: codejedi365 Date: Sun, 25 May 2025 14:15:50 -0600 Subject: [PATCH 09/14] test(fixtures): always run e2e tests in very verbose mode for test failure debugging (#1258) * test(e2e): update tests to ignore logging messages when validating stderr output --- tests/conftest.py | 3 +- tests/e2e/cmd_version/test_version.py | 7 +++-- tests/e2e/cmd_version/test_version_print.py | 31 +++++++++++++------- tests/e2e/cmd_version/test_version_strict.py | 7 +++-- tests/e2e/conftest.py | 21 ++++++++++++- tests/e2e/test_main.py | 17 ++++++++--- 6 files changed, 66 insertions(+), 20 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index 16298e98b..2d081f62b 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -207,10 +207,11 @@ def _run_cli( cli_runner = CliRunner(mix_stderr=False) env_vars = {**clean_os_environment, **(env or {})} + args = ["-vv", *(argv or [])] with mock.patch.dict(os.environ, env_vars, clear=True): # run the CLI with the provided arguments - return cli_runner.invoke(main, args=(argv or []), **(invoke_kwargs or {})) + return cli_runner.invoke(main, args=args, **(invoke_kwargs or {})) return _run_cli diff --git a/tests/e2e/cmd_version/test_version.py b/tests/e2e/cmd_version/test_version.py index 5cb9700cf..0af19f8a3 100644 --- a/tests/e2e/cmd_version/test_version.py +++ b/tests/e2e/cmd_version/test_version.py @@ -26,6 +26,7 @@ from requests_mock import Mocker from tests.conftest import RunCliFn + from tests.e2e.conftest import StripLoggingMessagesFn from tests.fixtures.example_project import GetWheelFileFn, UpdatePyprojectTomlFn from tests.fixtures.git_repo import BuiltRepoResult, GetVersionsFromRepoBuildDefFn @@ -151,6 +152,7 @@ def test_version_on_nonrelease_branch( run_cli: RunCliFn, mocked_git_push: MagicMock, post_mocker: Mocker, + strip_logging_messages: StripLoggingMessagesFn, ): """ Given repo is on a non-release branch, @@ -175,7 +177,7 @@ def test_version_on_nonrelease_branch( # Evaluate (expected -> actual) assert_successful_exit_code(result, cli_cmd) assert not result.stdout - assert expected_error_msg == result.stderr + assert expected_error_msg == strip_logging_messages(result.stderr) # assert nothing else happened (no code changes, no commit, no tag, no push, no vcs release) tags_after = sorted([tag.name for tag in repo.tags]) @@ -196,6 +198,7 @@ def test_version_on_last_release( run_cli: RunCliFn, mocked_git_push: MagicMock, post_mocker: Mocker, + strip_logging_messages: StripLoggingMessagesFn, ): """ Given repo is on the last release version, @@ -229,7 +232,7 @@ def test_version_on_last_release( # Evaluate (expected -> actual) assert_successful_exit_code(result, cli_cmd) assert f"{latest_release_version}\n" == result.stdout - assert f"{expected_error_msg}\n" == result.stderr + assert f"{expected_error_msg}\n" == strip_logging_messages(result.stderr) # assert nothing else happened (no code changes, no commit, no tag, no push, no vcs release) assert repo_status_before == repo_status_after diff --git a/tests/e2e/cmd_version/test_version_print.py b/tests/e2e/cmd_version/test_version_print.py index 4efd1e02f..18c0fc5f7 100644 --- a/tests/e2e/cmd_version/test_version_print.py +++ b/tests/e2e/cmd_version/test_version_print.py @@ -35,6 +35,7 @@ from requests_mock import Mocker from tests.conftest import RunCliFn + from tests.e2e.conftest import StripLoggingMessagesFn from tests.fixtures.git_repo import ( BuiltRepoResult, GetCfgValueFromDefFn, @@ -442,6 +443,7 @@ def test_version_print_last_released_prints_version( run_cli: RunCliFn, mocked_git_push: MagicMock, post_mocker: Mocker, + strip_logging_messages: StripLoggingMessagesFn, ): repo = repo_result["repo"] latest_release_version = get_versions_from_repo_build_def( @@ -465,7 +467,7 @@ def test_version_print_last_released_prints_version( # Evaluate assert_successful_exit_code(result, cli_cmd) - assert not result.stderr + assert not strip_logging_messages(result.stderr) assert f"{latest_release_version}\n" == result.stdout # assert nothing else happened (no code changes, no commit, no tag, no push, no vcs release) @@ -493,6 +495,7 @@ def test_version_print_last_released_prints_released_if_commits( mocked_git_push: MagicMock, post_mocker: Mocker, file_in_repo: str, + strip_logging_messages: StripLoggingMessagesFn, ): repo = repo_result["repo"] latest_release_version = get_versions_from_repo_build_def( @@ -520,7 +523,7 @@ def test_version_print_last_released_prints_released_if_commits( # Evaluate assert_successful_exit_code(result, cli_cmd) - assert not result.stderr + assert not strip_logging_messages(result.stderr) assert f"{latest_release_version}\n" == result.stdout # assert nothing else happened (no code changes, no commit, no tag, no push, no vcs release) @@ -585,6 +588,7 @@ def test_version_print_last_released_on_detached_head( run_cli: RunCliFn, mocked_git_push: MagicMock, post_mocker: Mocker, + strip_logging_messages: StripLoggingMessagesFn, ): repo = repo_result["repo"] latest_release_version = get_versions_from_repo_build_def( @@ -611,7 +615,7 @@ def test_version_print_last_released_on_detached_head( # Evaluate (expected -> actual) assert_successful_exit_code(result, cli_cmd) - assert not result.stderr + assert not strip_logging_messages(result.stderr) assert f"{latest_release_version}\n" == result.stdout # assert nothing else happened (no code changes, no commit, no tag, no push, no vcs release) @@ -632,6 +636,7 @@ def test_version_print_last_released_on_nonrelease_branch( run_cli: RunCliFn, mocked_git_push: MagicMock, post_mocker: Mocker, + strip_logging_messages: StripLoggingMessagesFn, ): repo = repo_result["repo"] latest_release_version = get_versions_from_repo_build_def( @@ -658,7 +663,7 @@ def test_version_print_last_released_on_nonrelease_branch( # Evaluate (expected -> actual) assert_successful_exit_code(result, cli_cmd) - assert not result.stderr + assert not strip_logging_messages(result.stderr) assert f"{latest_release_version}\n" == result.stdout # assert nothing else happened (no code changes, no commit, no tag, no push, no vcs release) @@ -688,6 +693,7 @@ def test_version_print_last_released_tag_prints_correct_tag( run_cli: RunCliFn, mocked_git_push: MagicMock, post_mocker: Mocker, + strip_logging_messages: StripLoggingMessagesFn, ): repo = repo_result["repo"] repo_def = repo_result["definition"] @@ -712,7 +718,7 @@ def test_version_print_last_released_tag_prints_correct_tag( # Evaluate assert_successful_exit_code(result, cli_cmd) - assert not result.stderr + assert not strip_logging_messages(result.stderr) assert f"{latest_release_tag}\n" == result.stdout # assert nothing else happened (no code changes, no commit, no tag, no push, no vcs release) @@ -748,6 +754,7 @@ def test_version_print_last_released_tag_prints_released_if_commits( mocked_git_push: MagicMock, post_mocker: Mocker, file_in_repo: str, + strip_logging_messages: StripLoggingMessagesFn, ): repo = repo_result["repo"] repo_def = repo_result["definition"] @@ -776,7 +783,7 @@ def test_version_print_last_released_tag_prints_released_if_commits( # Evaluate assert_successful_exit_code(result, cli_cmd) - assert not result.stderr + assert not strip_logging_messages(result.stderr) assert f"{latest_release_tag}\n" == result.stdout # assert nothing else happened (no code changes, no commit, no tag, no push, no vcs release) @@ -850,6 +857,7 @@ def test_version_print_last_released_tag_on_detached_head( run_cli: RunCliFn, mocked_git_push: MagicMock, post_mocker: Mocker, + strip_logging_messages: StripLoggingMessagesFn, ): repo = repo_result["repo"] repo_def = repo_result["definition"] @@ -877,7 +885,7 @@ def test_version_print_last_released_tag_on_detached_head( # Evaluate (expected -> actual) assert_successful_exit_code(result, cli_cmd) - assert not result.stderr + assert not strip_logging_messages(result.stderr) assert f"{latest_release_tag}\n" == result.stdout # assert nothing else happened (no code changes, no commit, no tag, no push, no vcs release) @@ -907,6 +915,7 @@ def test_version_print_last_released_tag_on_nonrelease_branch( run_cli: RunCliFn, mocked_git_push: MagicMock, post_mocker: Mocker, + strip_logging_messages: StripLoggingMessagesFn, ): repo = repo_result["repo"] repo_def = repo_result["definition"] @@ -934,7 +943,7 @@ def test_version_print_last_released_tag_on_nonrelease_branch( # Evaluate (expected -> actual) assert_successful_exit_code(result, cli_cmd) - assert not result.stderr + assert not strip_logging_messages(result.stderr) assert f"{last_release_tag}\n" == result.stdout # assert nothing else happened (no code changes, no commit, no tag, no push, no vcs release) @@ -961,6 +970,7 @@ def test_version_print_next_version_fails_on_detached_head( get_commit_def_fn: GetCommitDefFn, mocked_git_push: MagicMock, post_mocker: Mocker, + strip_logging_messages: StripLoggingMessagesFn, ): repo = repo_result["repo"] expected_error_msg = ( @@ -994,7 +1004,7 @@ def test_version_print_next_version_fails_on_detached_head( # Evaluate (expected -> actual) assert_exit_code(1, result, cli_cmd) assert not result.stdout - assert f"{expected_error_msg}\n" == result.stderr + assert f"{expected_error_msg}\n" == strip_logging_messages(result.stderr) # assert nothing else happened (no code changes, no commit, no tag, no push, no vcs release) assert repo_status_before == repo_status_after @@ -1020,6 +1030,7 @@ def test_version_print_next_tag_fails_on_detached_head( get_commit_def_fn: GetCommitDefFn, mocked_git_push: MagicMock, post_mocker: Mocker, + strip_logging_messages: StripLoggingMessagesFn, ): repo = repo_result["repo"] expected_error_msg = ( @@ -1053,7 +1064,7 @@ def test_version_print_next_tag_fails_on_detached_head( # Evaluate (expected -> actual) assert_exit_code(1, result, cli_cmd) assert not result.stdout - assert f"{expected_error_msg}\n" == result.stderr + assert f"{expected_error_msg}\n" == strip_logging_messages(result.stderr) # assert nothing else happened (no code changes, no commit, no tag, no push, no vcs release) assert repo_status_before == repo_status_after diff --git a/tests/e2e/cmd_version/test_version_strict.py b/tests/e2e/cmd_version/test_version_strict.py index 951a9966f..a41998ded 100644 --- a/tests/e2e/cmd_version/test_version_strict.py +++ b/tests/e2e/cmd_version/test_version_strict.py @@ -17,6 +17,7 @@ from requests_mock import Mocker from tests.conftest import RunCliFn + from tests.e2e.conftest import StripLoggingMessagesFn from tests.fixtures.git_repo import BuiltRepoResult, GetVersionsFromRepoBuildDefFn @@ -30,6 +31,7 @@ def test_version_already_released_when_strict( run_cli: RunCliFn, mocked_git_push: MagicMock, post_mocker: Mocker, + strip_logging_messages: StripLoggingMessagesFn, ): """ Given repo has no new changes since the last release, @@ -60,7 +62,7 @@ def test_version_already_released_when_strict( # Evaluate assert_exit_code(2, result, cli_cmd) assert f"{latest_release_version}\n" == result.stdout - assert f"{expected_error_msg}\n" == result.stderr + assert f"{expected_error_msg}\n" == strip_logging_messages(result.stderr) # assert nothing else happened (no code changes, no commit, no tag, no push, no vcs release) assert repo_status_before == repo_status_after @@ -78,6 +80,7 @@ def test_version_on_nonrelease_branch_when_strict( run_cli: RunCliFn, mocked_git_push: MagicMock, post_mocker: Mocker, + strip_logging_messages: StripLoggingMessagesFn, ): """ Given repo is on a non-release branch, @@ -103,7 +106,7 @@ def test_version_on_nonrelease_branch_when_strict( # Evaluate assert_exit_code(2, result, cli_cmd) assert not result.stdout - assert expected_error_msg == result.stderr + assert expected_error_msg == strip_logging_messages(result.stderr) # assert nothing else happened (no code changes, no commit, no tag, no push, no vcs release) tags_after = sorted([tag.name for tag in repo.tags]) diff --git a/tests/e2e/conftest.py b/tests/e2e/conftest.py index b64d5aecf..209f3654e 100644 --- a/tests/e2e/conftest.py +++ b/tests/e2e/conftest.py @@ -2,7 +2,7 @@ import os from pathlib import Path -from re import IGNORECASE, compile as regexp +from re import IGNORECASE, MULTILINE, compile as regexp from typing import TYPE_CHECKING from unittest.mock import MagicMock @@ -47,6 +47,9 @@ class RetrieveRuntimeContextFn(Protocol): def __call__(self, repo: Repo) -> RuntimeContext: ... + class StripLoggingMessagesFn(Protocol): + def __call__(self, log: str) -> str: ... + @pytest.hookimpl(tryfirst=True) def pytest_collection_modifyitems(items: list[pytest.Item]) -> None: @@ -116,6 +119,22 @@ def _retrieve_runtime_context(repo: Repo) -> RuntimeContext: return _retrieve_runtime_context +@pytest.fixture(scope="session") +def strip_logging_messages() -> StripLoggingMessagesFn: + """Fixture to strip logging messages from the output.""" + # Log levels match SemanticReleaseLogLevel enum values + logger_msg_pattern = regexp( + r"^\s*(?:\[\d\d:\d\d:\d\d\])?\s*(FATAL|CRITICAL|ERROR|WARNING|INFO|DEBUG|SILLY).*?\n(?:\s+\S.*?\n)*(?!\n[ ]{11})", + MULTILINE, + ) + + def _strip_logging_messages(log: str) -> str: + # Make sure it ends with a newline + return logger_msg_pattern.sub("", log.rstrip("\n") + "\n") + + return _strip_logging_messages + + @pytest.fixture(scope="session") def long_hash_pattern() -> Pattern: return regexp(r"\b([0-9a-f]{40})\b", IGNORECASE) diff --git a/tests/e2e/test_main.py b/tests/e2e/test_main.py index ff290146e..8ce3c58a5 100644 --- a/tests/e2e/test_main.py +++ b/tests/e2e/test_main.py @@ -8,6 +8,7 @@ import git import pytest +from click.testing import CliRunner from pytest_lazy_fixtures.lazy_fixture import lf as lazy_fixture from semantic_release import __version__ @@ -20,6 +21,7 @@ from pathlib import Path from tests.conftest import RunCliFn + from tests.e2e.conftest import StripLoggingMessagesFn from tests.fixtures.example_project import ExProjectDir, UpdatePyprojectTomlFn from tests.fixtures.git_repo import BuiltRepoResult @@ -59,8 +61,13 @@ def test_main_prints_version_and_exits(run_cli: RunCliFn): assert result.output == f"semantic-release, version {__version__}\n" -def test_main_no_args_prints_help_text(run_cli: RunCliFn): - assert_successful_exit_code(run_cli(), [MAIN_PROG_NAME]) +def test_main_no_args_passes_w_help_text(): + from semantic_release.cli.commands.main import main + + cli_cmd = [MAIN_PROG_NAME] + result = CliRunner().invoke(main, prog_name=cli_cmd[0]) + assert_successful_exit_code(result, cli_cmd) + assert "Usage: " in result.output @pytest.mark.parametrize( @@ -210,7 +217,9 @@ def test_errors_when_config_file_does_not_exist_and_passed_explicitly( @pytest.mark.usefixtures(repo_w_no_tags_conventional_commits.__name__) def test_errors_when_config_file_invalid_configuration( - run_cli: RunCliFn, update_pyproject_toml: UpdatePyprojectTomlFn + run_cli: RunCliFn, + update_pyproject_toml: UpdatePyprojectTomlFn, + strip_logging_messages: StripLoggingMessagesFn, ): # Setup update_pyproject_toml("tool.semantic_release.remote.type", "invalidType") @@ -220,7 +229,7 @@ def test_errors_when_config_file_invalid_configuration( result = run_cli(cli_cmd[1:]) # preprocess results - stderr_lines = result.stderr.splitlines() + stderr_lines = strip_logging_messages(result.stderr).splitlines() # Evaluate assert_exit_code(1, result, cli_cmd) From b15f3cb1a0529a32eb149ce25d9a60ca4448b88e Mon Sep 17 00:00:00 2001 From: semantic-release Date: Sun, 25 May 2025 20:32:16 +0000 Subject: [PATCH 10/14] 10.0.1 Automatically generated by python-semantic-release --- CHANGELOG.rst | 15 +++++++++++++++ .../automatic-releases/github-actions.rst | 18 +++++++++--------- pyproject.toml | 2 +- 3 files changed, 25 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index c2f11439b..6df94b9f6 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,6 +4,21 @@ CHANGELOG ========= +.. _changelog-v10.0.1: + +v10.0.1 (2025-05-25) +==================== + +🪲 Bug Fixes +------------ + +* **github-actions**: Bump the github-actions dependency to ``v10.0.0`` (#1255) (`PR#1255`_, + `2803676`_) + +.. _2803676: https://github.com/python-semantic-release/python-semantic-release/commit/2803676cf26c52177fa98d9144934853744a22bb +.. _PR#1255: https://github.com/python-semantic-release/python-semantic-release/pull/1255 + + .. _changelog-v10.0.0: v10.0.0 (2025-05-25) diff --git a/docs/configuration/automatic-releases/github-actions.rst b/docs/configuration/automatic-releases/github-actions.rst index d8a8bd012..7c2750491 100644 --- a/docs/configuration/automatic-releases/github-actions.rst +++ b/docs/configuration/automatic-releases/github-actions.rst @@ -382,7 +382,7 @@ before the :ref:`version ` subcommand. .. code:: yaml - - uses: python-semantic-release/python-semantic-release@v10.0.0 + - uses: python-semantic-release/python-semantic-release@v10.0.1 with: root_options: "-vv --noop" @@ -699,7 +699,7 @@ before the :ref:`publish ` subcommand. .. code:: yaml - - uses: python-semantic-release/publish-action@v10.0.0 + - uses: python-semantic-release/publish-action@v10.0.1 with: root_options: "-vv --noop" @@ -873,14 +873,14 @@ to the GitHub Release Assets as well. - name: Action | Semantic Version Release id: release # Adjust tag with desired version if applicable. - uses: python-semantic-release/python-semantic-release@v10.0.0 + uses: python-semantic-release/python-semantic-release@v10.0.1 with: github_token: ${{ secrets.GITHUB_TOKEN }} git_committer_name: "github-actions" git_committer_email: "actions@users.noreply.github.com" - name: Publish | Upload to GitHub Release Assets - uses: python-semantic-release/publish-action@v10.0.0 + uses: python-semantic-release/publish-action@v10.0.1 if: steps.release.outputs.released == 'true' with: github_token: ${{ secrets.GITHUB_TOKEN }} @@ -979,7 +979,7 @@ The equivalent GitHub Action configuration would be: - name: Action | Semantic Version Release # Adjust tag with desired version if applicable. - uses: python-semantic-release/python-semantic-release@v10.0.0 + uses: python-semantic-release/python-semantic-release@v10.0.1 with: github_token: ${{ secrets.GITHUB_TOKEN }} force: patch @@ -1038,14 +1038,14 @@ Publish Action. - name: Release submodule 1 id: release-submod-1 - uses: python-semantic-release/python-semantic-release@v10.0.0 + uses: python-semantic-release/python-semantic-release@v10.0.1 with: directory: ${{ env.SUBMODULE_1_DIR }} github_token: ${{ secrets.GITHUB_TOKEN }} - name: Release submodule 2 id: release-submod-2 - uses: python-semantic-release/python-semantic-release@v10.0.0 + uses: python-semantic-release/python-semantic-release@v10.0.1 with: directory: ${{ env.SUBMODULE_2_DIR }} github_token: ${{ secrets.GITHUB_TOKEN }} @@ -1057,7 +1057,7 @@ Publish Action. # ------------------------------------------------------------------- # - name: Publish | Upload package 1 to GitHub Release Assets - uses: python-semantic-release/publish-action@v10.0.0 + uses: python-semantic-release/publish-action@v10.0.1 if: steps.release-submod-1.outputs.released == 'true' with: directory: ${{ env.SUBMODULE_1_DIR }} @@ -1065,7 +1065,7 @@ Publish Action. tag: ${{ steps.release-submod-1.outputs.tag }} - name: Publish | Upload package 2 to GitHub Release Assets - uses: python-semantic-release/publish-action@v10.0.0 + uses: python-semantic-release/publish-action@v10.0.1 if: steps.release-submod-2.outputs.released == 'true' with: directory: ${{ env.SUBMODULE_2_DIR }} diff --git a/pyproject.toml b/pyproject.toml index ec0bc1f8e..d14279384 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta" [project] name = "python-semantic-release" -version = "10.0.0" +version = "10.0.1" description = "Automatic Semantic Versioning for Python projects" requires-python = ">=3.8" license = { text = "MIT" } From 3b7b821b6ebbdc1866c8f9852f1c6967e86cd898 Mon Sep 17 00:00:00 2001 From: codejedi365 Date: Sun, 25 May 2025 14:37:17 -0600 Subject: [PATCH 11/14] Revert "10.0.1" This reverts commit b15f3cb1a0529a32eb149ce25d9a60ca4448b88e. Revert commit because release & deploy process failed in CI. Must revert. --- CHANGELOG.rst | 15 --------------- .../automatic-releases/github-actions.rst | 18 +++++++++--------- pyproject.toml | 2 +- 3 files changed, 10 insertions(+), 25 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 6df94b9f6..c2f11439b 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,21 +4,6 @@ CHANGELOG ========= -.. _changelog-v10.0.1: - -v10.0.1 (2025-05-25) -==================== - -🪲 Bug Fixes ------------- - -* **github-actions**: Bump the github-actions dependency to ``v10.0.0`` (#1255) (`PR#1255`_, - `2803676`_) - -.. _2803676: https://github.com/python-semantic-release/python-semantic-release/commit/2803676cf26c52177fa98d9144934853744a22bb -.. _PR#1255: https://github.com/python-semantic-release/python-semantic-release/pull/1255 - - .. _changelog-v10.0.0: v10.0.0 (2025-05-25) diff --git a/docs/configuration/automatic-releases/github-actions.rst b/docs/configuration/automatic-releases/github-actions.rst index 7c2750491..d8a8bd012 100644 --- a/docs/configuration/automatic-releases/github-actions.rst +++ b/docs/configuration/automatic-releases/github-actions.rst @@ -382,7 +382,7 @@ before the :ref:`version ` subcommand. .. code:: yaml - - uses: python-semantic-release/python-semantic-release@v10.0.1 + - uses: python-semantic-release/python-semantic-release@v10.0.0 with: root_options: "-vv --noop" @@ -699,7 +699,7 @@ before the :ref:`publish ` subcommand. .. code:: yaml - - uses: python-semantic-release/publish-action@v10.0.1 + - uses: python-semantic-release/publish-action@v10.0.0 with: root_options: "-vv --noop" @@ -873,14 +873,14 @@ to the GitHub Release Assets as well. - name: Action | Semantic Version Release id: release # Adjust tag with desired version if applicable. - uses: python-semantic-release/python-semantic-release@v10.0.1 + uses: python-semantic-release/python-semantic-release@v10.0.0 with: github_token: ${{ secrets.GITHUB_TOKEN }} git_committer_name: "github-actions" git_committer_email: "actions@users.noreply.github.com" - name: Publish | Upload to GitHub Release Assets - uses: python-semantic-release/publish-action@v10.0.1 + uses: python-semantic-release/publish-action@v10.0.0 if: steps.release.outputs.released == 'true' with: github_token: ${{ secrets.GITHUB_TOKEN }} @@ -979,7 +979,7 @@ The equivalent GitHub Action configuration would be: - name: Action | Semantic Version Release # Adjust tag with desired version if applicable. - uses: python-semantic-release/python-semantic-release@v10.0.1 + uses: python-semantic-release/python-semantic-release@v10.0.0 with: github_token: ${{ secrets.GITHUB_TOKEN }} force: patch @@ -1038,14 +1038,14 @@ Publish Action. - name: Release submodule 1 id: release-submod-1 - uses: python-semantic-release/python-semantic-release@v10.0.1 + uses: python-semantic-release/python-semantic-release@v10.0.0 with: directory: ${{ env.SUBMODULE_1_DIR }} github_token: ${{ secrets.GITHUB_TOKEN }} - name: Release submodule 2 id: release-submod-2 - uses: python-semantic-release/python-semantic-release@v10.0.1 + uses: python-semantic-release/python-semantic-release@v10.0.0 with: directory: ${{ env.SUBMODULE_2_DIR }} github_token: ${{ secrets.GITHUB_TOKEN }} @@ -1057,7 +1057,7 @@ Publish Action. # ------------------------------------------------------------------- # - name: Publish | Upload package 1 to GitHub Release Assets - uses: python-semantic-release/publish-action@v10.0.1 + uses: python-semantic-release/publish-action@v10.0.0 if: steps.release-submod-1.outputs.released == 'true' with: directory: ${{ env.SUBMODULE_1_DIR }} @@ -1065,7 +1065,7 @@ Publish Action. tag: ${{ steps.release-submod-1.outputs.tag }} - name: Publish | Upload package 2 to GitHub Release Assets - uses: python-semantic-release/publish-action@v10.0.1 + uses: python-semantic-release/publish-action@v10.0.0 if: steps.release-submod-2.outputs.released == 'true' with: directory: ${{ env.SUBMODULE_2_DIR }} diff --git a/pyproject.toml b/pyproject.toml index d14279384..ec0bc1f8e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta" [project] name = "python-semantic-release" -version = "10.0.1" +version = "10.0.0" description = "Automatic Semantic Versioning for Python projects" requires-python = ">=3.8" license = { text = "MIT" } From 74f72606b7a1fe9b67ff6f6d184b77222b2473e4 Mon Sep 17 00:00:00 2001 From: codejedi365 Date: Sun, 25 May 2025 15:31:41 -0600 Subject: [PATCH 12/14] ci(deps): force `python-semantic-release` action to have `v10.0.0` --- .github/workflows/cicd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index 8c8b45c45..6fa69a102 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -145,7 +145,7 @@ jobs: - name: Release | Python Semantic Release id: release - uses: python-semantic-release/python-semantic-release@092ace20f4ebed6a656da54b499076f1a5b803c8 # v10.0.0 + uses: python-semantic-release/python-semantic-release@2803676cf26c52177fa98d9144934853744a22bb with: github_token: ${{ secrets.GITHUB_TOKEN }} verbosity: 1 From f92899174544414d915973cd574418bf7268ca1b Mon Sep 17 00:00:00 2001 From: codejedi365 Date: Sun, 25 May 2025 15:45:28 -0600 Subject: [PATCH 13/14] ci(release): add filesystem check post psr action to detect error --- .github/workflows/cicd.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index 6fa69a102..50286d5bc 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -165,6 +165,7 @@ jobs: GIT_COMMITTER_NAME: ${{ env.GITHUB_ACTIONS_AUTHOR_NAME }} GIT_COMMITTER_EMAIL: ${{ env.GITHUB_ACTIONS_AUTHOR_EMAIL }} run: | + ls -la .git/ MINOR_VERSION_TAG="$(echo "$FULL_VERSION_TAG" | cut -d. -f1,2)" git tag --force --annotate "$MINOR_VERSION_TAG" "${FULL_VERSION_TAG}^{}" -m "$MINOR_VERSION_TAG" git push -u origin "$MINOR_VERSION_TAG" --force From 917a2c730cb8f6c8cd3d00f23c876d724a4a844c Mon Sep 17 00:00:00 2001 From: semantic-release Date: Sun, 25 May 2025 22:02:48 +0000 Subject: [PATCH 14/14] 10.0.1 Automatically generated by python-semantic-release --- CHANGELOG.rst | 14 ++++++++++++++ .../automatic-releases/github-actions.rst | 18 +++++++++--------- pyproject.toml | 2 +- src/gh_action/requirements.txt | 2 +- 4 files changed, 25 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index c2f11439b..cecf469dc 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,6 +4,20 @@ CHANGELOG ========= +.. _changelog-v10.0.1: + +v10.0.1 (2025-05-25) +==================== + +🪲 Bug Fixes +------------ + +* **github-actions**: Bump the github-actions dependency to ``v10.0.0`` (`PR#1255`_, `2803676`_) + +.. _2803676: https://github.com/python-semantic-release/python-semantic-release/commit/2803676cf26c52177fa98d9144934853744a22bb +.. _PR#1255: https://github.com/python-semantic-release/python-semantic-release/pull/1255 + + .. _changelog-v10.0.0: v10.0.0 (2025-05-25) diff --git a/docs/configuration/automatic-releases/github-actions.rst b/docs/configuration/automatic-releases/github-actions.rst index d8a8bd012..7c2750491 100644 --- a/docs/configuration/automatic-releases/github-actions.rst +++ b/docs/configuration/automatic-releases/github-actions.rst @@ -382,7 +382,7 @@ before the :ref:`version ` subcommand. .. code:: yaml - - uses: python-semantic-release/python-semantic-release@v10.0.0 + - uses: python-semantic-release/python-semantic-release@v10.0.1 with: root_options: "-vv --noop" @@ -699,7 +699,7 @@ before the :ref:`publish ` subcommand. .. code:: yaml - - uses: python-semantic-release/publish-action@v10.0.0 + - uses: python-semantic-release/publish-action@v10.0.1 with: root_options: "-vv --noop" @@ -873,14 +873,14 @@ to the GitHub Release Assets as well. - name: Action | Semantic Version Release id: release # Adjust tag with desired version if applicable. - uses: python-semantic-release/python-semantic-release@v10.0.0 + uses: python-semantic-release/python-semantic-release@v10.0.1 with: github_token: ${{ secrets.GITHUB_TOKEN }} git_committer_name: "github-actions" git_committer_email: "actions@users.noreply.github.com" - name: Publish | Upload to GitHub Release Assets - uses: python-semantic-release/publish-action@v10.0.0 + uses: python-semantic-release/publish-action@v10.0.1 if: steps.release.outputs.released == 'true' with: github_token: ${{ secrets.GITHUB_TOKEN }} @@ -979,7 +979,7 @@ The equivalent GitHub Action configuration would be: - name: Action | Semantic Version Release # Adjust tag with desired version if applicable. - uses: python-semantic-release/python-semantic-release@v10.0.0 + uses: python-semantic-release/python-semantic-release@v10.0.1 with: github_token: ${{ secrets.GITHUB_TOKEN }} force: patch @@ -1038,14 +1038,14 @@ Publish Action. - name: Release submodule 1 id: release-submod-1 - uses: python-semantic-release/python-semantic-release@v10.0.0 + uses: python-semantic-release/python-semantic-release@v10.0.1 with: directory: ${{ env.SUBMODULE_1_DIR }} github_token: ${{ secrets.GITHUB_TOKEN }} - name: Release submodule 2 id: release-submod-2 - uses: python-semantic-release/python-semantic-release@v10.0.0 + uses: python-semantic-release/python-semantic-release@v10.0.1 with: directory: ${{ env.SUBMODULE_2_DIR }} github_token: ${{ secrets.GITHUB_TOKEN }} @@ -1057,7 +1057,7 @@ Publish Action. # ------------------------------------------------------------------- # - name: Publish | Upload package 1 to GitHub Release Assets - uses: python-semantic-release/publish-action@v10.0.0 + uses: python-semantic-release/publish-action@v10.0.1 if: steps.release-submod-1.outputs.released == 'true' with: directory: ${{ env.SUBMODULE_1_DIR }} @@ -1065,7 +1065,7 @@ Publish Action. tag: ${{ steps.release-submod-1.outputs.tag }} - name: Publish | Upload package 2 to GitHub Release Assets - uses: python-semantic-release/publish-action@v10.0.0 + uses: python-semantic-release/publish-action@v10.0.1 if: steps.release-submod-2.outputs.released == 'true' with: directory: ${{ env.SUBMODULE_2_DIR }} diff --git a/pyproject.toml b/pyproject.toml index ec0bc1f8e..d14279384 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta" [project] name = "python-semantic-release" -version = "10.0.0" +version = "10.0.1" description = "Automatic Semantic Versioning for Python projects" requires-python = ">=3.8" license = { text = "MIT" } diff --git a/src/gh_action/requirements.txt b/src/gh_action/requirements.txt index 2fabec60d..574893c77 100644 --- a/src/gh_action/requirements.txt +++ b/src/gh_action/requirements.txt @@ -1 +1 @@ -python-semantic-release == 10.0.0 +python-semantic-release == 10.0.1