From 607bf0a3676c0ba4775d541df57703cae040f6a8 Mon Sep 17 00:00:00 2001 From: Vithorio Polten Date: Thu, 30 May 2024 07:32:53 -0300 Subject: [PATCH 1/8] ci: improved changelog generator --- .github/workflows/CI.yml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 977eba517ff..77cb6ecf46b 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -562,6 +562,21 @@ jobs: token: ${{ secrets.GH_BOT_TOKEN }} validate: true + - name: "Generate Changelog" + id: build_changelog + # if: startsWith(github.ref, 'refs/tags/') + uses: mikepenz/release-changelog-builder-action@v4 + env: + GITHUB_TOKEN: ${{ secrets.GH_BOT_TOKEN }} + with: + ignorePreReleases: "true" + + - name: "Print Changelog" + id: print_changelog + run: | + echo "Generated Changelog" + echo "${{steps.build_changelog.outputs.changelog}}" + - name: Create/Update GitHub Release if: >- matrix.release && @@ -571,7 +586,8 @@ jobs: allowUpdates: true artifacts: '${{ github.workspace }}/homebrew/*' discussionCategory: announcements - generateReleaseNotes: true + generateReleaseNotes: false + body: ${{steps.build_changelog.outputs.changelog}} name: ${{ needs.setup_release.outputs.release_tag }} prerelease: true tag: ${{ needs.setup_release.outputs.release_tag }} From a51b1e6653fe96fef4c26af705aa1d5839e21d52 Mon Sep 17 00:00:00 2001 From: Vithorio Polten Date: Thu, 30 May 2024 08:39:13 -0300 Subject: [PATCH 2/8] ci: changelog from latest stable --- .github/workflows/CI.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 77cb6ecf46b..29bc1ee48ff 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -562,6 +562,15 @@ jobs: token: ${{ secrets.GH_BOT_TOKEN }} validate: true + - uses: cardinalby/git-get-release-action@v1 + id: github_latest_stable + env: + GITHUB_TOKEN: ${{ secrets.GH_BOT_TOKEN }} + with: + latest: true + draft: false + prerelease: false + - name: "Generate Changelog" id: build_changelog # if: startsWith(github.ref, 'refs/tags/') @@ -570,6 +579,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GH_BOT_TOKEN }} with: ignorePreReleases: "true" + fromTag: ${{steps.github_latest_stable.outputs.tag_name}} - name: "Print Changelog" id: print_changelog From deda691aa5becd4c500812aa195e0ddec84704bc Mon Sep 17 00:00:00 2001 From: Vithorio Polten Date: Thu, 30 May 2024 09:00:26 -0300 Subject: [PATCH 3/8] chore: fix env --- .github/workflows/CI.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 29bc1ee48ff..857f1e1e610 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -565,7 +565,7 @@ jobs: - uses: cardinalby/git-get-release-action@v1 id: github_latest_stable env: - GITHUB_TOKEN: ${{ secrets.GH_BOT_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: latest: true draft: false @@ -576,7 +576,7 @@ jobs: # if: startsWith(github.ref, 'refs/tags/') uses: mikepenz/release-changelog-builder-action@v4 env: - GITHUB_TOKEN: ${{ secrets.GH_BOT_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: ignorePreReleases: "true" fromTag: ${{steps.github_latest_stable.outputs.tag_name}} @@ -584,7 +584,7 @@ jobs: - name: "Print Changelog" id: print_changelog run: | - echo "Generated Changelog" + echo "Generated Changelog fromTag ${{steps.github_latest_stable.outputs.tag_name}} to ${{steps.build_changelog.outputs.toTag}}" echo "${{steps.build_changelog.outputs.changelog}}" - name: Create/Update GitHub Release From deae94171106312a54d7c3653fe2494cf361ba21 Mon Sep 17 00:00:00 2001 From: Vithorio Polten Date: Thu, 30 May 2024 09:20:42 -0300 Subject: [PATCH 4/8] ci: last test --- .github/workflows/CI.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 857f1e1e610..1180a90d24e 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -580,6 +580,39 @@ jobs: with: ignorePreReleases: "true" fromTag: ${{steps.github_latest_stable.outputs.tag_name}} + commitMode: true + configurationJson: | + { + "template": "#{{CHANGELOG}}", + "categories": [ + { + "title": "## Feature", + "labels": ["feat", "feature"] + }, + { + "title": "## Fix", + "labels": ["fix", "bug"] + }, + { + "title": "## Dependency changes", + "labels": ["deps", "dependency", "build(deps)"] + }, + { + "title": "## Breaking changes", + "labels": ["breaking"] + }, + { + "title": "## Other", + "labels": [] + } + ], + "label_extractor": [ + { + "pattern": "^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test){1}(\\([\\w\\-\\.]+\\))?(!)?: ([\\w ])+([\\s\\S]*)", + "target": "$1" + } + ], + } - name: "Print Changelog" id: print_changelog From b27ba75c52993fa32c95940a7df5de2857b96cba Mon Sep 17 00:00:00 2001 From: Vithorio Polten Date: Thu, 30 May 2024 10:00:03 -0300 Subject: [PATCH 5/8] chore: no commit mode --- .github/workflows/CI.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 1180a90d24e..8c4888c3ea3 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -580,7 +580,6 @@ jobs: with: ignorePreReleases: "true" fromTag: ${{steps.github_latest_stable.outputs.tag_name}} - commitMode: true configurationJson: | { "template": "#{{CHANGELOG}}", @@ -609,6 +608,12 @@ jobs: "label_extractor": [ { "pattern": "^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test){1}(\\([\\w\\-\\.]+\\))?(!)?: ([\\w ])+([\\s\\S]*)", + "on_property": "body", + "target": "$1" + }, + { + "pattern": "^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test){1}(\\([\\w\\-\\.]+\\))?(!)?: ([\\w ])+([\\s\\S]*)", + "on_property": "title", "target": "$1" } ], From 13f4a24c6b3c2a4b7f02c6ee967f7a343edfaf3b Mon Sep 17 00:00:00 2001 From: Vithorio Polten Date: Thu, 30 May 2024 10:15:45 -0300 Subject: [PATCH 6/8] chore: another action --- .github/workflows/CI.yml | 53 ++++++---------------------------------- 1 file changed, 7 insertions(+), 46 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 8c4888c3ea3..47be547a1ae 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -573,57 +573,18 @@ jobs: - name: "Generate Changelog" id: build_changelog - # if: startsWith(github.ref, 'refs/tags/') - uses: mikepenz/release-changelog-builder-action@v4 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + uses: requarks/changelog-action@v1 with: - ignorePreReleases: "true" - fromTag: ${{steps.github_latest_stable.outputs.tag_name}} - configurationJson: | - { - "template": "#{{CHANGELOG}}", - "categories": [ - { - "title": "## Feature", - "labels": ["feat", "feature"] - }, - { - "title": "## Fix", - "labels": ["fix", "bug"] - }, - { - "title": "## Dependency changes", - "labels": ["deps", "dependency", "build(deps)"] - }, - { - "title": "## Breaking changes", - "labels": ["breaking"] - }, - { - "title": "## Other", - "labels": [] - } - ], - "label_extractor": [ - { - "pattern": "^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test){1}(\\([\\w\\-\\.]+\\))?(!)?: ([\\w ])+([\\s\\S]*)", - "on_property": "body", - "target": "$1" - }, - { - "pattern": "^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test){1}(\\([\\w\\-\\.]+\\))?(!)?: ([\\w ])+([\\s\\S]*)", - "on_property": "title", - "target": "$1" - } - ], - } + token: ${{ secrets.GITHUB_TOKEN }} + fromTag: ${{ github.ref_name }} + toTag: ${{steps.github_latest_stable.outputs.tag_name}} + writeToFile: false - name: "Print Changelog" id: print_changelog run: | - echo "Generated Changelog fromTag ${{steps.github_latest_stable.outputs.tag_name}} to ${{steps.build_changelog.outputs.toTag}}" - echo "${{steps.build_changelog.outputs.changelog}}" + echo "Generated Changelog fromTag ${{steps.github_latest_stable.outputs.tag_name}} to ${{ github.ref_name }}" + echo "${{steps.build_changelog.outputs.changes}}" - name: Create/Update GitHub Release if: >- From 868de3a223b4b7a6066d357d0da146e1ae5cb86a Mon Sep 17 00:00:00 2001 From: Vithorio Polten Date: Thu, 30 May 2024 10:31:43 -0300 Subject: [PATCH 7/8] Update .github/workflows/CI.yml --- .github/workflows/CI.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 47be547a1ae..def777238b8 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -576,8 +576,8 @@ jobs: uses: requarks/changelog-action@v1 with: token: ${{ secrets.GITHUB_TOKEN }} - fromTag: ${{ github.ref_name }} - toTag: ${{steps.github_latest_stable.outputs.tag_name}} + fromTag: ${{steps.github_latest_stable.outputs.tag_name}} + toTag: ${{ github.ref_name }} writeToFile: false - name: "Print Changelog" From cd0e49d34cc3072bc372669fda0fd593ce5479b3 Mon Sep 17 00:00:00 2001 From: Vithorio Polten Date: Thu, 30 May 2024 10:37:46 -0300 Subject: [PATCH 8/8] Update .github/workflows/CI.yml --- .github/workflows/CI.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index def777238b8..0cedc7a776e 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -576,8 +576,8 @@ jobs: uses: requarks/changelog-action@v1 with: token: ${{ secrets.GITHUB_TOKEN }} - fromTag: ${{steps.github_latest_stable.outputs.tag_name}} - toTag: ${{ github.ref_name }} + fromTag: "v2024.529.1057" + toTag: ${{steps.github_latest_stable.outputs.tag_name}} writeToFile: false - name: "Print Changelog"