chore(workflows): improve git-cliff installation and tagging
All checks were successful
Auto Changelog & Release / detect-version-change (push) Successful in 3s
Auto Changelog & Release / release (push) Has been skipped
Auto Changelog & Release / changelog-only (push) Successful in 14s
Build and Publish nightly package / build-and-publish (push) Successful in 31s
All checks were successful
Auto Changelog & Release / detect-version-change (push) Successful in 3s
Auto Changelog & Release / release (push) Has been skipped
Auto Changelog & Release / changelog-only (push) Successful in 14s
Build and Publish nightly package / build-and-publish (push) Successful in 31s
- Add `--locked` flag to ensure reproducible git-cliff builds - Set author and committer dates for consistent tag timestamps - Fix minor formatting inconsistencies in the workflow file
This commit is contained in:
@@ -4,7 +4,7 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
- '**'
|
- "**"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
detect-version-change:
|
detect-version-change:
|
||||||
@@ -69,7 +69,7 @@ jobs:
|
|||||||
- name: Install git-cliff
|
- name: Install git-cliff
|
||||||
if: steps.restore-cliff.outputs.cache-hit != 'true'
|
if: steps.restore-cliff.outputs.cache-hit != 'true'
|
||||||
run: |
|
run: |
|
||||||
cargo install git-cliff --version "${{ steps.cliff_version.outputs.version }}" --features gitea
|
cargo install git-cliff --locked --version "${{ steps.cliff_version.outputs.version }}" --features gitea
|
||||||
|
|
||||||
- name: Generate unreleased changelog (if file exists or on main)
|
- name: Generate unreleased changelog (if file exists or on main)
|
||||||
run: |
|
run: |
|
||||||
@@ -124,7 +124,7 @@ jobs:
|
|||||||
- name: Install git-cliff
|
- name: Install git-cliff
|
||||||
if: steps.restore-cliff.outputs.cache-hit != 'true'
|
if: steps.restore-cliff.outputs.cache-hit != 'true'
|
||||||
run: |
|
run: |
|
||||||
cargo install git-cliff --version "${{ steps.cliff_version.outputs.version }}" --features gitea
|
cargo install git-cliff --locked --version "${{ steps.cliff_version.outputs.version }}" --features gitea
|
||||||
|
|
||||||
- name: Generate changelog for release and tag
|
- name: Generate changelog for release and tag
|
||||||
id: generate-changelog
|
id: generate-changelog
|
||||||
@@ -152,7 +152,6 @@ jobs:
|
|||||||
|
|
||||||
echo "changelog_body_path=$BODY" >> $GITHUB_OUTPUT
|
echo "changelog_body_path=$BODY" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
|
||||||
- name: Commit updated CHANGELOG
|
- name: Commit updated CHANGELOG
|
||||||
run: |
|
run: |
|
||||||
git add CHANGELOG.md
|
git add CHANGELOG.md
|
||||||
@@ -169,6 +168,8 @@ jobs:
|
|||||||
if git rev-parse "v$VERSION" >/dev/null 2>&1; then
|
if git rev-parse "v$VERSION" >/dev/null 2>&1; then
|
||||||
echo "Tag v$VERSION already exists, skipping tag creation."
|
echo "Tag v$VERSION already exists, skipping tag creation."
|
||||||
else
|
else
|
||||||
|
export GIT_AUTHOR_DATE="$(date --iso-8601=seconds)"
|
||||||
|
export GIT_COMMITTER_DATE="$GIT_AUTHOR_DATE"
|
||||||
git tag -a "v$VERSION" -F "${{ steps.generate-changelog.outputs.changelog_body_path }}" --cleanup=verbatim
|
git tag -a "v$VERSION" -F "${{ steps.generate-changelog.outputs.changelog_body_path }}" --cleanup=verbatim
|
||||||
git push origin "v$VERSION"
|
git push origin "v$VERSION"
|
||||||
fi
|
fi
|
||||||
|
Reference in New Issue
Block a user