mirror of
https://github.com/darkzoul5/YoutubePlaylistSync.git
synced 2026-07-04 21:04:01 +03:00
feat(ci): add commits since last tag to release notes
This commit is contained in:
@@ -233,16 +233,46 @@ jobs:
|
|||||||
needs: build
|
needs: build
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
- uses: actions/checkout@v6
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Download artifacts
|
- name: Download artifacts
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v8
|
||||||
with:
|
with:
|
||||||
path: artifacts
|
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
|
- name: Create release
|
||||||
uses: softprops/action-gh-release@v2
|
uses: softprops/action-gh-release@v3
|
||||||
with:
|
with:
|
||||||
tag_name: ${{ inputs.tag }}
|
tag_name: ${{ inputs.tag }}
|
||||||
draft: ${{ inputs.draft }}
|
draft: ${{ inputs.draft }}
|
||||||
|
body_path: release-notes.md
|
||||||
files: |
|
files: |
|
||||||
artifacts/**/*.zip
|
artifacts/**/*.zip
|
||||||
artifacts/**/*.tar.gz
|
artifacts/**/*.tar.gz
|
||||||
|
|||||||
Reference in New Issue
Block a user