Compare commits
2 Commits
eb8bd80d48
...
dc4aeb1e51
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dc4aeb1e51 | ||
|
|
ea1b333da3 |
@@ -46,14 +46,18 @@ jobs:
|
|||||||
requested_tag="$(printf '%s' "${REQUESTED_TAG:-}" | sed 's/^[[:space:]]\+//; s/[[:space:]]\+$//')"
|
requested_tag="$(printf '%s' "${REQUESTED_TAG:-}" | sed 's/^[[:space:]]\+//; s/[[:space:]]\+$//')"
|
||||||
|
|
||||||
if [[ -n "$requested_tag" ]]; then
|
if [[ -n "$requested_tag" ]]; then
|
||||||
# Explicit tag was provided
|
# Explicit tag was provided via input or workflow_call
|
||||||
normalized="${requested_tag#v}"
|
normalized="${requested_tag#v}"
|
||||||
tag="v${normalized}"
|
tag="v${normalized}"
|
||||||
elif [[ "$GITHUB_REF" == refs/tags/* ]]; then
|
elif [[ "$GITHUB_REF" == refs/tags/* ]]; then
|
||||||
# Running from a tag push
|
# Running from a tag push
|
||||||
tag="${GITHUB_REF#refs/tags/}"
|
tag="${GITHUB_REF#refs/tags/}"
|
||||||
normalized="${tag#v}"
|
normalized="${tag#v}"
|
||||||
elif tag_at_head="$(git describe --exact-match --tags HEAD 2>/dev/null)" && [[ -n "$tag_at_head" ]]; then
|
else
|
||||||
|
# Try to find tags at HEAD (fetch latest first in case called from prepare-release)
|
||||||
|
git fetch origin --tags --quiet 2>/dev/null || true
|
||||||
|
|
||||||
|
if tag_at_head="$(git describe --exact-match --tags HEAD 2>/dev/null)" && [[ -n "$tag_at_head" ]]; then
|
||||||
# Current HEAD is at a tag
|
# Current HEAD is at a tag
|
||||||
tag="$tag_at_head"
|
tag="$tag_at_head"
|
||||||
normalized="${tag#v}"
|
normalized="${tag#v}"
|
||||||
@@ -62,6 +66,7 @@ jobs:
|
|||||||
echo "Provide a tag via the 'tag' input or ensure HEAD is at a tagged commit." >&2
|
echo "Provide a tag via the 'tag' input or ensure HEAD is at a tagged commit." >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
echo "tag=${tag}" >> "$GITHUB_OUTPUT"
|
echo "tag=${tag}" >> "$GITHUB_OUTPUT"
|
||||||
echo "version=${normalized}" >> "$GITHUB_OUTPUT"
|
echo "version=${normalized}" >> "$GITHUB_OUTPUT"
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ A `### Breaking` section is used in addition to Keep a Changelog's standard sect
|
|||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
|
- Made `do-release` version resolution support empty version input when called from `prepare-release` via `workflow_call` by fetching latest tags from origin before attempting to resolve from HEAD tags, allowing version discovery even if tags were just pushed and not yet local.
|
||||||
- Fixed version resolution in `do-release` workflow by moving version calculation before checkout, resolving from inputs/git tags, and always passing explicit version to `publish` action.
|
- Fixed version resolution in `do-release` workflow by moving version calculation before checkout, resolving from inputs/git tags, and always passing explicit version to `publish` action.
|
||||||
- Made `publish` action version resolution more robust with clearer error messages when version input is missing and workflow is not running from a tag push.
|
- Made `publish` action version resolution more robust with clearer error messages when version input is missing and workflow is not running from a tag push.
|
||||||
- Fixed `do-release` workflow to always checkout the resolved release tag, eliminating conditional checkout logic that could skip the checkout when called from `prepare-release` workflow.
|
- Fixed `do-release` workflow to always checkout the resolved release tag, eliminating conditional checkout logic that could skip the checkout when called from `prepare-release` workflow.
|
||||||
|
|||||||
Reference in New Issue
Block a user