Update commits
This commit is contained in:
parent
1eeb81d98d
commit
54d6b71f19
1 changed files with 4 additions and 9 deletions
|
@ -7,7 +7,7 @@ on:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build_latex:
|
build_latex:
|
||||||
runs-on: [docker] # Use your Forgejo runner with the 'docker' label.
|
runs-on: [docker] # Use your Forgejo runner with the 'docker' label
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
pull-requests: write
|
pull-requests: write
|
||||||
|
@ -46,18 +46,13 @@ jobs:
|
||||||
# Get the current tag name (e.g., v1.0.0)
|
# Get the current tag name (e.g., v1.0.0)
|
||||||
TAG_NAME=${GITHUB_REF#refs/tags/}
|
TAG_NAME=${GITHUB_REF#refs/tags/}
|
||||||
|
|
||||||
# Find the commit where this tag was created
|
|
||||||
TAG_COMMIT=$(git rev-list -n 1 $TAG_NAME)
|
|
||||||
|
|
||||||
# Find the previous tag (if it exists)
|
# Find the previous tag (if it exists)
|
||||||
PREVIOUS_TAG=$(git describe --tags --abbrev=0 --match "v*" $TAG_COMMIT^ 2>/dev/null || echo "")
|
PREVIOUS_TAG=$(git describe --tags --abbrev=0 --match "v*" $(git rev-list --tags --skip=1 --max-count=1) 2>/dev/null || echo "")
|
||||||
|
|
||||||
# Get commit messages only for the current tag
|
# Get commit messages between the previous tag and the current tag
|
||||||
if [ -z "$PREVIOUS_TAG" ]; then
|
if [ -z "$PREVIOUS_TAG" ]; then
|
||||||
# No previous tag, show all commits leading up to this tag
|
COMMITS=$(git log --pretty=format:'- %s' $TAG_NAME --no-merges)
|
||||||
COMMITS=$(git log --pretty=format:'- %s' $TAG_COMMIT --no-merges)
|
|
||||||
else
|
else
|
||||||
# Show commits only between the previous tag and the current tag
|
|
||||||
COMMITS=$(git log $PREVIOUS_TAG..$TAG_NAME --pretty=format:'- %s' --no-merges)
|
COMMITS=$(git log $PREVIOUS_TAG..$TAG_NAME --pretty=format:'- %s' --no-merges)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue