Skip to content

Commit be60eb0

Browse files
authored
add release branch name (#21)
* add branch name in release description
1 parent 8e165da commit be60eb0

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

.github/workflows/release.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,12 @@ jobs:
5555
id: prev_tag
5656
run: echo "PREV_TAG=$(git describe --tags --abbrev=0 $(git rev-list --tags --skip=1 --max-count=1))" >> $GITHUB_ENV
5757

58+
- name: Find Source Branch
59+
id: branch
60+
run: |
61+
BRANCH_NAME=$(git branch -r --contains $GITHUB_SHA | grep -v 'HEAD' | head -n 1 | awk '{print $1}' | sed 's/origin\///')
62+
echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV
63+
5864
# Generate the changelog (commit messages between tags)
5965
- name: Generate Changelog
6066
id: changelog
@@ -99,6 +105,9 @@ jobs:
99105
body: |
100106
🚀 **New release of Sekrets ${{ env.LIB_VERSION }}**!
101107
108+
### 🌿 Release Branch:
109+
This release was tagged from the **`${{ env.BRANCH_NAME }}`** branch.
110+
102111
### 🔄 Changes:
103112
${{ env.CHANGELOG }}
104113

0 commit comments

Comments
 (0)