From 39946c83663398ebc4fad6f1a9679f22a5299ac7 Mon Sep 17 00:00:00 2001 From: Marco Realacci Date: Tue, 28 Jan 2025 19:32:04 +0100 Subject: [PATCH] use dch --- .forgejo/workflows/build-debian-package.yml | 25 ++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/.forgejo/workflows/build-debian-package.yml b/.forgejo/workflows/build-debian-package.yml index 916d3c1..3cdfa7a 100644 --- a/.forgejo/workflows/build-debian-package.yml +++ b/.forgejo/workflows/build-debian-package.yml @@ -29,11 +29,26 @@ jobs: - name: Generate dynamic changelog run: | - mkdir -p debian # Ensure the debian directory exists - sed -e "s/{{VERSION}}/${{ steps.version.outputs.DEB_VERSION }}/g" \ - -e "s/{{TAG}}/$GITHUB_REF_NAME/g" \ - debian/changelog.in > debian/changelog - cat debian/changelog # Debugging: Print the generated changelog + VERSION=${{ github.ref_name#v }} # Rimuove il prefisso "v" dal tag + DISTRIBUTION=$DISTRO # Dalla variabile impostata in "Parse distribution" + + # Configura dch per generare il changelog + dch --create \ + --package magicfw \ + --newversion "$VERSION" \ + --distribution "$DISTRIBUTION" \ + "Automatic release from Git tag ${GITHUB_REF_NAME}" + + # Debug: Mostra il contenuto del changelog generato + cat debian/changelog + +# - name: Generate dynamic changelog +# run: | +# mkdir -p debian # Ensure the debian directory exists +# sed -e "s/{{VERSION}}/${{ steps.version.outputs.DEB_VERSION }}/g" \ +# -e "s/{{TAG}}/$GITHUB_REF_NAME/g" \ +# debian/changelog.in > debian/changelog +# cat debian/changelog # Debugging: Print the generated changelog - name: Build Debian Package run: |