From f3027587d6e42a8846adc2a9ce2bc7a72ff9bdfb Mon Sep 17 00:00:00 2001 From: Dariusz L Date: Mon, 21 Jul 2025 23:15:58 +0200 Subject: [PATCH] Improve release workflow to show commit history The release workflow now fetches the full git history and displays all commit messages since the last tag in the release notes, instead of only the latest commit. Also bumps the project version to 1.3.8 in pyproject.toml. --- .github/workflows/release.yml | 38 +++++++++++++++++++++++++++-------- pyproject.toml | 2 +- 2 files changed, 31 insertions(+), 9 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7688ab7..9c5a2ac 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,6 +12,8 @@ jobs: steps: - name: Checkout repo uses: actions/checkout@v4 + with: + fetch-depth: 0 # Pobierz pełną historię Git (potrzebne do git log) - name: Extract base version from pyproject.toml id: version @@ -33,12 +35,32 @@ jobs: run: | echo "final_tag=v${{ steps.version.outputs.base_version }}" >> $GITHUB_OUTPUT - - name: Get latest commit message - id: last_commit + # ZMIANA: Zamiast tylko ostatniego commita, pobierz historię commitów od ostatniego tagu + - name: Get commit history since last tag + id: commit_history run: | - msg=$(git log -1 --pretty=%B) - msg=${msg//$'\n'/\\n} - echo "commit_msg=$msg" >> $GITHUB_OUTPUT + # Znajdź ostatni tag (jeśli istnieje) + LAST_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "") + + # Jeśli nie ma ostatniego tagu, użyj pustego (pobierz od początku repo) + if [ -z "$LAST_TAG" ]; then + RANGE="HEAD" + else + RANGE="$LAST_TAG..HEAD" + fi + + # Pobierz listę commitów (tylko subject/tytuł, format: - Commit message) + HISTORY=$(git log --pretty=format:"- %s" $RANGE) + + # Zastąp nowe linie na \\n, aby dobrze wyglądało w output + HISTORY=${HISTORY//$'\n'/\\n} + + # Jeśli brak commitów, ustaw domyślną wiadomość + if [ -z "$HISTORY" ]; then + HISTORY="No changes since last release." + fi + + echo "commit_history=$HISTORY" >> $GITHUB_OUTPUT - name: Create GitHub Release uses: softprops/action-gh-release@v1 @@ -48,9 +70,9 @@ jobs: body: | 📦 Release based on pyproject.toml version `${{ steps.version.outputs.base_version }}` - 📝 Last commit message: + 📝 Changes since last release: ``` - ${{ steps.last_commit.outputs.commit_msg }} + ${{ steps.commit_history.outputs.commit_history }} ``` env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 50b08c2..874f4dd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "layerforge" description = "Photoshop-like layered canvas editor to your ComfyUI workflow. This node is perfect for complex compositing, inpainting, and outpainting, featuring multi-layer support, masking, blend modes, and precise transformations. Includes optional AI-powered background removal for streamlined image editing." -version = "1.3.7" +version = "1.3.8" license = {file = "LICENSE"} dependencies = ["torch", "torchvision", "transformers", "aiohttp", "numpy", "tqdm", "Pillow"]