Update commit messages
This commit is contained in:
parent
b22bb49cec
commit
22cca0d0fd
1 changed files with 6 additions and 10 deletions
|
@ -7,7 +7,7 @@ on:
|
|||
|
||||
jobs:
|
||||
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:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
|
@ -46,15 +46,11 @@ jobs:
|
|||
# Get the current tag name (e.g., v1.0.0)
|
||||
TAG_NAME=${GITHUB_REF#refs/tags/}
|
||||
|
||||
# Find the previous tag (if it exists)
|
||||
PREVIOUS_TAG=$(git describe --tags --abbrev=0 --match "v*" $(git rev-list --tags --skip=1 --max-count=1) 2>/dev/null || echo "")
|
||||
# Get the commit associated with the tag
|
||||
TAG_COMMIT=$(git rev-list -n 1 $TAG_NAME)
|
||||
|
||||
# Get commit messages between the previous tag and the current tag
|
||||
if [ -z "$PREVIOUS_TAG" ]; then
|
||||
COMMITS=$(git log --pretty=format:'- %s' $TAG_NAME --no-merges)
|
||||
else
|
||||
COMMITS=$(git log $PREVIOUS_TAG..$TAG_NAME --pretty=format:'- %s' --no-merges)
|
||||
fi
|
||||
# Retrieve all commit messages leading up to this tag
|
||||
COMMITS=$(git log --pretty=format:'- %s' $TAG_COMMIT --no-merges)
|
||||
|
||||
# Store commit messages in environment variable
|
||||
echo "commits<<EOF" >> $GITHUB_ENV
|
||||
|
@ -78,4 +74,4 @@ jobs:
|
|||
url: https://git.leomurca.xyz
|
||||
repo: leomurca/resume
|
||||
title: "Release ${{ github.ref_name }}"
|
||||
release-notes: "${{ env.commits }}"
|
||||
release-notes: "${{ env.commits }}"
|
Loading…
Add table
Reference in a new issue