Skip to content

Open source, composable payments platform | PCI compliant | SaaS and Self-host options | Enables connectivity to multiple payment, payout, fraud, vault and tokenization providers | Uplifts authorization with intelligent routing and revenue recovery | Reduce payment processing costs with cost observability | Reduces payment ops with reconciliation

CI: update release new version workflow to not generate release notes (#2941)

Chethan Raoa701db70caff
diff --git a/.github/git-cliff-release.toml b/.github/git-cliff-release.toml
deleted file mode 100644
index 1b82c812b5..0000000000
--- a/.github/git-cliff-release.toml
+++ /dev/null
@@ -1,89 +0,0 @@
-# configuration file for git-cliff
-# see https://github.com/orhun/git-cliff#configuration-file
-
-[changelog]
-# changelog header
-header = ""
-# template for the changelog body
-# https://tera.netlify.app/docs/#introduction
-body = """
-{% set newline = "\n" -%}
-{% set commit_base_url = "https://github.com/juspay/hyperswitch/commit/" -%}
-{% set compare_base_url = "https://github.com/juspay/hyperswitch/compare/" -%}
-{% if version -%}
- ## {{ version | trim_start_matches(pat="v") }} ({{ timestamp | date(format="%Y-%m-%d") }})
-{% else -%}
- ## [unreleased]
-{% endif -%}
-{% for group, commits in commits | group_by(attribute="group") %}
- {# The `striptags` removes the HTML comments added while grouping -#}
- ### {{ group | striptags | trim | upper_first }}
- {% for scope, commits in commits | group_by(attribute="scope") %}
- - {{ "**" ~ scope ~ ":" ~ "**" -}}
- {% for commit in commits -%}
- {% if commits | length != 1 %}{{ newline ~ " - " }}{% else %}{{ " " }}{% endif -%}
- {{ commit.message | upper_first | trim }} ([`{{ commit.id | truncate(length=7, end="") }}`]({{ commit_base_url ~ commit.id }})) by {{ commit.author.email -}}
- {%- endfor -%}
- {%- endfor -%}
- {%- for commit in commits -%}
- {% if commit.scope %}{% else %}
- - {{ commit.message | upper_first | trim }} ([`{{ commit.id | truncate(length=7, end="") }}`]({{ commit_base_url ~ commit.id }})) by {{ commit.author.email -}}
- {%- endif %}
- {%- endfor %}
-{% endfor %}
-{% if previous and previous.commit_id and commit_id -%}
- **Full Changelog:** [`{{ previous.version }}...{{ version }}`]({{ compare_base_url }}{{ previous.version }}...{{ version }})\n
-{% endif %}
-"""
-# remove the leading and trailing whitespace from the template
-trim = true
-# changelog footer
-footer = ""
-
-[git]
-# parse the commits based on https://www.conventionalcommits.org
-conventional_commits = true
-# filter out the commits that are not conventional
-filter_unconventional = false
-# process each line of a commit as an individual commit
-split_commits = false
-# regex for preprocessing the commit messages
-commit_preprocessors = [
- { pattern = "^ +", replace = "" }, # remove spaces at the beginning of the message
- { pattern = " +", replace = " " }, # replace multiple spaces with a single space
- { pattern = "\\(#([0-9]+)\\)", replace = "([#${1}](https://github.com/juspay/hyperswitch/pull/${1}))" }, # replace PR numbers with links
- { pattern = "(\\n?Co-authored-by: .+ <.+@.+>\\n?)+", replace = "" }, # remove co-author information
- { pattern = "(\\n?Signed-off-by: .+ <.+@.+>\\n?)+", replace = "" }, # remove sign-off information
-]
-# regex for parsing and grouping commits
-# the HTML comments (`<!-- N -->`) are a workaround to get sections in custom order, since `git-cliff` sorts sections in alphabetical order
-# reference: https://github.com/orhun/git-cliff/issues/9
-commit_parsers = [
- { message = "^(?i)(feat)", group = "<!-- 0 -->Features" },
- { message = "^(?i)(fix)", group = "<!-- 1 -->Bug Fixes" },
- { message = "^(?i)(perf)", group = "<!-- 2 -->Performance" },
- { body = ".*security", group = "<!-- 3 -->Security" },
- { message = "^(?i)(refactor)", group = "<!-- 4 -->Refactors" },
- { message = "^(?i)(test)", group = "<!-- 5 -->Testing" },
- { message = "^(?i)(docs)", group = "<!-- 6 -->Documentation" },
- { message = "^(?i)(chore\\(version\\)): V[\\d]+\\.[\\d]+\\.[\\d]+", skip = true },
- { message = "^(?i)(chore)", group = "<!-- 7 -->Miscellaneous Tasks" },
- { message = "^(?i)(build)", group = "<!-- 8 -->Build System / Dependencies" },
- { message = "^(?i)(ci)", skip = true },
-]
-# protect breaking changes from being skipped due to matching a skipping commit_parser
-protect_breaking_commits = false
-# filter out the commits that are not matched by commit parsers
-filter_commits = false
-# glob pattern for matching git tags
-tag_pattern = "v[0-9]*"
-# regex for skipping tags
-# skip_tags = "v0.1.0-beta.1"
-# regex for ignoring tags
-# ignore_tags = ""
-# sort the tags topologically
-topo_order = true
-# sort the commits inside sections by oldest/newest order
-sort_commits = "oldest"
-# limit the number of commits included in the changelog.
-# limit_commits = 42
diff --git a/.github/workflows/release-new-version.yml b/.github/workflows/release-new-version.yml
index 872c207e8a..eda2df0515 100644
--- a/.github/workflows/release-new-version.yml
+++ b/.github/workflows/release-new-version.yml
@@ -40,19 +40,6 @@ jobs:
crate: cocogitto
version: 5.4.0
- - name: Install git-cliff
- uses: baptiste0928/[email protected]
- with:
- crate: git-cliff
- version: 1.2.0
-
- - name: Install changelog-gh-usernames
- uses: baptiste0928/[email protected]
- with:
- crate: changelog-gh-usernames
- git: https://github.com/SanchithHegde/changelog-gh-usernames
- rev: dab6da3ff99dbbff8650c114984c4d8be5161ac8
-
- name: Set Git Configuration
shell: bash
run: |
@@ -87,7 +74,7 @@ jobs:
PREVIOUS_TAG="$(git tag --sort='version:refname' --merged | tail --lines 1)"
if [[ "$(cog bump --auto --dry-run)" == *"No conventional commits for your repository that required a bump"* ]]; then
NEW_TAG="$(cog bump --patch --dry-run)"
- elif [[ "${PREVIOUS_TAG}" != "${NEW_TAG}" ]]; then
+ else
NEW_TAG="$(cog bump --auto --dry-run)"
fi
echo "NEW_TAG=${NEW_TAG}" >> $GITHUB_ENV
@@ -106,15 +93,3 @@ jobs:
run: |
git push
git push --tags
-
- - name: Generate release notes and create GitHub release
- shell: bash
- if: ${{ env.NEW_TAG != env.PREVIOUS_TAG }}
- env:
- GITHUB_TOKEN: ${{ github.token }}
- GH_TOKEN: ${{ secrets.AUTO_RELEASE_PAT }}
- # Need to consider commits inclusive of previous tag to generate diff link between versions.
- # This would also then require us to remove the last few lines from the changelog.
- run: |
- git-cliff --config .github/git-cliff-release.toml "${PREVIOUS_TAG}^..${NEW_TAG}" | changelog-gh-usernames | sed "/## ${PREVIOUS_TAG#v}/,\$d" > release-notes.md
- gh release create "${NEW_TAG}" --notes-file release-notes.md --verify-tag --title "Hyperswitch ${NEW_TAG}"