From 0ca00763e77b867053b1925ec2e50860665774d4 Mon Sep 17 00:00:00 2001 From: Marc Espin Date: Fri, 20 Dec 2024 17:32:14 +0100 Subject: [PATCH] fix(wallet-ci): Properly generate the changelog upon prod releases (#4363) * fix: Append the git-generated changelog to the file instead of writing over * chore: add cat of changelog * force to fetch all the commits and tags * Update .github/workflows/apps_wallet_prod_build.yml Co-authored-by: DaughterOfMars --------- Co-authored-by: DaughterOfMars --- .github/workflows/apps_wallet_prod_build.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/apps_wallet_prod_build.yml b/.github/workflows/apps_wallet_prod_build.yml index f4714cd53e1..9a8052331d8 100644 --- a/.github/workflows/apps_wallet_prod_build.yml +++ b/.github/workflows/apps_wallet_prod_build.yml @@ -20,6 +20,11 @@ jobs: steps: - name: Checking out the repository uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 + with: + # Number of commits to fetch. 0 indicates all history for all branches and tags. Default: 1 + fetch-depth: 0 + # Whether to fetch tags, even if fetch-depth > 0. + fetch-tags: "true" - uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0 - name: Install Nodejs uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 @@ -61,8 +66,9 @@ jobs: echo "No previous tag found. Skipping changelog generation." echo "changelog=No previous tag found. Changelog generation skipped." >> $GITHUB_OUTPUT else - echo "## Changelog" >> CHANGELOG.md - git log ${{ env.PREV_TAG }}..${{ env.CURRENT_TAG }} --pretty=format:"- %s in #%h" -- ./apps/wallet > CHANGELOG.md + echo "## Changelog" > CHANGELOG.md + git log ${{ env.PREV_TAG }}..${{ env.CURRENT_TAG }} --pretty=format:"- %s in #%h" -- ./apps/wallet >> CHANGELOG.md + cat CHANGELOG.md fi - name: Get version from tag