Skip to content

Commit 917c69b

Browse files
Experimental workflow containing commits
1 parent 766969f commit 917c69b

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

.github/workflows/build.yml

+22
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,27 @@ jobs:
9898
permissions:
9999
contents: write
100100
steps:
101+
- name: Checkout Repository
102+
uses: actions/checkout@v4
103+
with:
104+
fetch-depth: 0 # This ensures we fetch all history and tags
105+
106+
- name: Get previous tag
107+
run: |
108+
echo "PREVIOUS_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo '')" >> $GITHUB_ENV
109+
110+
- name: Generate commit history
111+
run: |
112+
if [ -n "${{ env.PREVIOUS_TAG }}" ]; then
113+
echo "### Commits since ${{ env.PREVIOUS_TAG }}" > CHANGELOG.md
114+
echo "" >> CHANGELOG.md
115+
git log --pretty=format:"- [%h](${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/commit/%H) %s" ${{ env.PREVIOUS_TAG }}..HEAD >> CHANGELOG.md
116+
else
117+
echo "### Initial Release" > CHANGELOG.md
118+
echo "" >> CHANGELOG.md
119+
git log --pretty=format:"- [%h](${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/commit/%H) %s" >> CHANGELOG.md
120+
fi
121+
101122
- name: Download all artifacts
102123
uses: actions/download-artifact@v4
103124
with:
@@ -112,5 +133,6 @@ jobs:
112133
files: |
113134
./artifacts/AppleBlox-*/*.dmg
114135
generate_release_notes: true
136+
body_path: CHANGELOG.md
115137
env:
116138
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)