ci(release): fetch tags before building changelog (was empty)
v1.2.2's auto-changelog came out empty: in a detached-HEAD tag checkout the tag refs git describe/git log need aren't reliably present even with fetch-depth:0. Fetch them explicitly first.
This commit is contained in:
@@ -133,6 +133,9 @@ jobs:
|
|||||||
- name: Generate changelog
|
- name: Generate changelog
|
||||||
id: changelog
|
id: changelog
|
||||||
run: |
|
run: |
|
||||||
|
# fetch-depth:0 gets history, but the tag refs the changelog needs
|
||||||
|
# aren't always present in a detached-HEAD tag checkout — pull them in.
|
||||||
|
git fetch --tags --force --quiet origin 2>/dev/null || true
|
||||||
TAG="${{ github.event.inputs.tag || github.ref_name }}"
|
TAG="${{ github.event.inputs.tag || github.ref_name }}"
|
||||||
PREV="$(git describe --tags --abbrev=0 "${TAG}^" 2>/dev/null || true)"
|
PREV="$(git describe --tags --abbrev=0 "${TAG}^" 2>/dev/null || true)"
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user