diff --git a/.github/workflows/_shared-docker-clone.yaml b/.github/workflows/_shared-docker-clone.yaml index a92f1b91..89981ac2 100644 --- a/.github/workflows/_shared-docker-clone.yaml +++ b/.github/workflows/_shared-docker-clone.yaml @@ -52,7 +52,7 @@ jobs: tagstr="${{ matrix.tag }}" tagparts=(${tagstr//:/ }) echo "source_tag=${tagparts[0]}" >> $GITHUB_OUTPUT - if [ -z "$tagparts[1]" ]; then + if [ -z "${tagparts[1]}" ]; then echo "target_tag=${tagparts[0]}" >> $GITHUB_OUTPUT else echo "target_tag=${tagparts[1]}" >> $GITHUB_OUTPUT diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml index 4a8c3907..dd7dde8b 100644 --- a/.github/workflows/build-release.yml +++ b/.github/workflows/build-release.yml @@ -40,6 +40,25 @@ jobs: needs: [build_binaries] runs-on: ubuntu-latest steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 100 + ref: ${{ github.sha }} + - name: "Generate release changelog" + id: changelog + run: | + git fetch --tags + prev_tag=$(git tag --sort=-version:refname | grep -e "^v[0-9.]*$" | head -n 1) + echo "previous release: $prev_tag" + if [ "$prev_tag" ]; then + changelog=$(git log --oneline --no-decorate $prev_tag..HEAD) + else + changelog=$(git log --oneline --no-decorate) + fi + echo "changelog=<> $GITHUB_OUTPUT + echo " - ${changelog//$'\n'/$'\n' - }" >> $GITHUB_OUTPUT + echo "EOF" >> $GITHUB_OUTPUT + # download build artifacts - name: "Download build artifacts" uses: actions/download-artifact@v3 @@ -54,8 +73,8 @@ jobs: release_name: "v${{ inputs.version }}" tag_name: "v${{ inputs.version }}" body: | - ### Major Changes - ... + ### Changes + ${{ steps.changelog.outputs.changelog }} ### Release Artifacts Please read through the [wiki](https://github.com/pk910/dora/wiki) for setup & configuration instructions.