diff --git a/.github/workflows/release-dev.yaml b/.github/workflows/release-dev.yaml index 8ae8c73b3..f9168f171 100644 --- a/.github/workflows/release-dev.yaml +++ b/.github/workflows/release-dev.yaml @@ -38,6 +38,9 @@ jobs: id: changes run: | release_notes="$(git log --after="$(date --date="yesterday" +"%Y-%m-%d %H:%m")" --before="$(date +"%Y-%m-%d %H:%m")" --pretty=format:"* %h: %s")" + release_notes="${release_notes//'%'/'%25'}" + release_notes="${release_notes//$'\n'/'%0A'}" + release_notes="${release_notes//$'\r'/'%0D'}" echo "::set-output name=changes::$(echo ${release_notes} | wc -l)" echo "::set-output name=release_notes::${release_notes}" - name: Get date for artifacts diff --git a/.github/workflows/release-main.yaml b/.github/workflows/release-main.yaml index ca3c79a56..0dfb2622c 100644 --- a/.github/workflows/release-main.yaml +++ b/.github/workflows/release-main.yaml @@ -34,7 +34,11 @@ jobs: - name: changes id: changes run: | - release_notes="$(git log --after="$(date --date="yesterday" +"%Y-%m-%d %H:%m")" --before="$(date +"%Y-%m-%d %H:%m")" --pretty=format:"* %h: %s")" + prevrelcommit="$(git rev-list --tags --max-count=1)" + release_notes="$(git log ${prevrelcommit}..HEAD --pretty=format:"* %h: %s")" + release_notes="${release_notes//'%'/'%25'}" + release_notes="${release_notes//$'\n'/'%0A'}" + release_notes="${release_notes//$'\r'/'%0D'}" echo "::set-output name=changes::$(echo ${release_notes} | wc -l)" echo "::set-output name=release_notes::${release_notes}" - name: Get date for artifacts