From a5061f5cd8351ffd4bf34563ba41c261470f888c Mon Sep 17 00:00:00 2001 From: Spolti Date: Tue, 27 Aug 2024 18:13:41 -0300 Subject: [PATCH] test Signed-off-by: Spolti --- .github/workflows/odh-create-release-tag.yml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/odh-create-release-tag.yml b/.github/workflows/odh-create-release-tag.yml index ff2f32bba1..e1d147b62f 100644 --- a/.github/workflows/odh-create-release-tag.yml +++ b/.github/workflows/odh-create-release-tag.yml @@ -6,6 +6,9 @@ on: tag_name: description: 'Tag name for the new release' required: true + prev_tag_name: + description: 'Previous Tag name for change log' + required: true permissions: contents: write @@ -72,7 +75,7 @@ jobs: git config --global user.email "github-actions@github.com" git config --global user.name "GitHub Actions" git add config/overlays/odh/params.env - git commit -m "Update image refs for odh release." + git commit -m "Update image refs for odh release." || true #hack to not fail when there is nothing to commit - name: Create Tag id: create_tag @@ -84,12 +87,19 @@ jobs: name: Changelog needs: [fetch-tag,update-params-env] runs-on: ubuntu-latest + env: + GH_TOKEN: ${{ github.token }} steps: - name: Checkout uses: actions/checkout@v4 with: ref: ${{ github.ref }} + - name: Generate Changelog + run: | + gh pr list --state merged --base ${{ github.event.inputs.prev_tag_name }} --head ${{ github.event.inputs.tag_name }} --json title,author,number | \ + jq -r '.[] | "* \(.title) by @\(.author.login) in #\(.number)"' > CHANGELOG.md + - name: Create Release uses: softprops/action-gh-release@v2 with: @@ -99,5 +109,6 @@ jobs: draft: false #this takes the path of payload to upload as an asset in the changelog files: bin/* - generate_release_notes: true + generate_release_notes: false name: ${{ github.event.inputs.tag_name }} + body_path: CHANGELOG.md