Skip to content

Commit db0100b

Browse files
Voeg stap toe om de vorige tag op te halen en verbeter de release notities generatie
1 parent 8dd58d4 commit db0100b

File tree

1 file changed

+11
-18
lines changed

1 file changed

+11
-18
lines changed

.github/workflows/build.yaml

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,12 @@ jobs:
133133
done
134134
"
135135
136+
- name: Get Previous Tag
137+
id: prev_tag
138+
run: |
139+
PREV_TAG=$(git describe --tags --abbrev=0)
140+
echo "PREV_TAG=$PREV_TAG" >> $GITHUB_ENV
141+
136142
- name: Generate Release Notes
137143
id: release_notes
138144
run: |
@@ -150,13 +156,10 @@ jobs:
150156
echo '### Changes'
151157
152158
# Get changes since last release
153-
if git tag | grep -q .; then
154-
LAST_TAG=\$(git describe --tags --abbrev=0 2>/dev/null || echo '')
155-
if [ ! -z \"\$LAST_TAG\" ]; then
156-
echo '#### Commits since last release:'
157-
git log \"\$LAST_TAG\"..HEAD --pretty=format:'- %s' | grep -v 'Merge'
158-
echo ''
159-
fi
159+
if [ ! -z \"$PREV_TAG\" ]; then
160+
echo '#### Commits since last release:'
161+
git log \"$PREV_TAG\"..HEAD --pretty=format:'- %s' | grep -v 'Merge'
162+
echo ''
160163
fi
161164
162165
# Add standard information
@@ -190,7 +193,7 @@ jobs:
190193
if: github.ref == 'refs/heads/main'
191194
with:
192195
tag_name: v${{ env.VERSION }}
193-
name: "Arch Linux No Beeps v${{ env.VERSION }}"
196+
name: "Release ${{ env.DATE }}"
194197
body: ${{ env.RELEASE_NOTES }}
195198
draft: false
196199
prerelease: false
@@ -206,13 +209,3 @@ jobs:
206209
docker rm -f arch-container || true
207210
fi
208211
sudo rm -rf workdir/ out/ /tmp/pacman-cache/*
209-
210-
- name: Upload Build Logs on Failure
211-
if: failure()
212-
uses: actions/upload-artifact@v4 # Upgrade to v4
213-
with:
214-
name: build-logs
215-
path: |
216-
${{ env.WORKSPACE }}/build.log
217-
retention-days: 5
218-
compression-level: 9 # Maximum compression for logs

0 commit comments

Comments
 (0)