mirror of
https://github.com/darkzoul5/YoutubePlaylistSync.git
synced 2026-07-04 12:54:08 +03:00
feat(ci): add commits since last tag to release notes
This commit is contained in:
@@ -233,16 +233,46 @@ jobs:
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Download artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
uses: actions/download-artifact@v8
|
||||
with:
|
||||
path: artifacts
|
||||
|
||||
- name: Generate release notes (since last tag)
|
||||
shell: bash
|
||||
env:
|
||||
TAG: ${{ inputs.tag }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
git fetch --tags --force
|
||||
|
||||
prev_tag="$(git tag --sort=-creatordate | grep -Fxv "$TAG" | head -n 1 || true)"
|
||||
|
||||
{
|
||||
echo "## Changes"
|
||||
echo
|
||||
if [[ -n "$prev_tag" ]]; then
|
||||
echo "Compared to \`$prev_tag\`:"
|
||||
echo
|
||||
git log "${prev_tag}..${TAG}" --no-merges --pretty=format:'- %s (%h)' || true
|
||||
else
|
||||
echo "First tagged release:"
|
||||
echo
|
||||
git log "${TAG}" --no-merges --pretty=format:'- %s (%h)' || true
|
||||
fi
|
||||
echo
|
||||
} > release-notes.md
|
||||
|
||||
- name: Create release
|
||||
uses: softprops/action-gh-release@v2
|
||||
uses: softprops/action-gh-release@v3
|
||||
with:
|
||||
tag_name: ${{ inputs.tag }}
|
||||
draft: ${{ inputs.draft }}
|
||||
body_path: release-notes.md
|
||||
files: |
|
||||
artifacts/**/*.zip
|
||||
artifacts/**/*.tar.gz
|
||||
|
||||
Reference in New Issue
Block a user