- rework toTag resolving fallback if build was not started from a tag

- fallback to retrieve `toTag` from git API (only if 2 tags are available)
  - FIX https://github.com/mikepenz/release-changelog-builder-action/issues/427
  - FIX https://github.com/mikepenz/release-changelog-builder-action/issues/433
- introduce test case to verify
This commit is contained in:
Mike Penz
2021-08-15 10:56:55 +02:00
parent 8433cedbc5
commit d22595ba8b
6 changed files with 238 additions and 108 deletions
+2 -2
View File
@@ -138,9 +138,9 @@ The action supports flexible configuration options to modify vast areas of its b
⚠️ Please note: It is required to have a `checkout` step prior to the changelog step, to allow the action to discover the configuration file.
⚠️ When running this action for a non tags trigger the `toTag` can't be automatically resolved, as such it is either required to provide `toTag` directly, or to specify a different `fetch-depth:` with the checkout action to include tags.
⚠️ When running this action for a non tags trigger the `toTag` will be automatically resolved using the latest tag as retrieved by the git API.
💡 By default not specifying `fromTag` or `toTag` will resolve `toTag` from either the `ref` or alternatively fallback to the latest tag from git. `fromTag` is resolved by sorting tags using [semver](https://semver.org/). Check the [configuration](#configuration-specification) for alternatives.
💡 By default not specifying `fromTag` or `toTag` will resolve `toTag` from either the `ref` or alternatively fallback to the latest tag from the git API. `fromTag` is resolved by sorting tags using [semver](https://semver.org/). Check the [configuration](#configuration-specification) for alternatives.
This configuration is a `.json` file in the following format.