-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: replace semantic-release with git-cliff and cliff-jumper
Signed-off-by: rare-magma <[email protected]>
- Loading branch information
1 parent
5d0cfb2
commit 600a476
Showing
5 changed files
with
95 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -83,6 +83,8 @@ jobs: | |
uses: actions/checkout@v4 | ||
with: | ||
persist-credentials: false | ||
fetch-depth: 0 | ||
ref: main | ||
|
||
- name: Install pnpm | ||
uses: pnpm/action-setup@v4 | ||
|
@@ -95,15 +97,17 @@ jobs: | |
node-version: 20 | ||
cache: "pnpm" | ||
|
||
- name: Semantic Release | ||
uses: cycjimmy/semantic-release-action@v4 | ||
with: | ||
extra_plugins: | | ||
@semantic-release/commit-analyzer | ||
@semantic-release/release-notes-generator | ||
@semantic-release/changelog | ||
@anolilab/semantic-release-pnpm | ||
@semantic-release/github | ||
@semantic-release/git | ||
- name: Configure Git | ||
run: | | ||
git remote set-url origin "https://${GITHUB_TOKEN}:[email protected]/${GITHUB_REPOSITORY}.git" | ||
git config --local user.email "${GITHUB_EMAIL}" | ||
git config --local user.name "${GITHUB_USER}" | ||
env: | ||
GITHUB_USER: github-actions[bot] | ||
GITHUB_EMAIL: 41898282+github-actions[bot]@users.noreply.github.com | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Bump Versions & Publish | ||
run: pnpx @favware/cliff-jumper | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.SEMANTIC_RELEASE_TOKEN }} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
# git-cliff ~ configuration file | ||
# https://git-cliff.org/docs/configuration | ||
|
||
[changelog] | ||
# template for the changelog body | ||
# https://keats.github.io/tera/docs/#introduction | ||
body = """ | ||
{%- macro remote_url() -%} | ||
https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }} | ||
{%- endmacro -%} | ||
{% macro print_commit(commit) -%} | ||
- {% if commit.scope %}*({{ commit.scope }})* {% endif %}\ | ||
{% if commit.breaking %}[**breaking**] {% endif %}\ | ||
{{ commit.message | upper_first }} - \ | ||
([{{ commit.id | truncate(length=7, end="") }}]({{ self::remote_url() }}/commit/{{ commit.id }}))\ | ||
{% endmacro -%} | ||
{% if version %}\ | ||
{% if previous.version %}\ | ||
## [{{ version | trim_start_matches(pat="v") }}]\ | ||
({{ self::remote_url() }}/compare/{{ previous.version }}..{{ version }}) ({{ timestamp | date(format="%Y-%m-%d") }}) | ||
{% else %}\ | ||
## [{{ version | trim_start_matches(pat="v") }}] ({{ timestamp | date(format="%Y-%m-%d") }}) | ||
{% endif %}\ | ||
{% else %}\ | ||
## [unreleased] | ||
{% endif %}\ | ||
{% for group, commits in commits | group_by(attribute="group") %} | ||
### {{ group | striptags | trim | upper_first }} | ||
{% for commit in commits | ||
| filter(attribute="scope") | ||
| sort(attribute="scope") %} | ||
{{ self::print_commit(commit=commit) }} | ||
{%- endfor -%} | ||
{% raw %}\n{% endraw %}\ | ||
{%- for commit in commits %} | ||
{%- if not commit.scope -%} | ||
{{ self::print_commit(commit=commit) }} | ||
{% endif -%} | ||
{% endfor -%} | ||
{% endfor %}\n | ||
""" | ||
# remove the leading and trailing whitespace from the templates | ||
trim = true | ||
|
||
[git] | ||
# parse the commits based on https://www.conventionalcommits.org | ||
conventional_commits = true | ||
# filter out the commits that are not conventional | ||
filter_unconventional = true | ||
# process each line of a commit as an individual commit | ||
split_commits = false | ||
# regex for parsing and grouping commits | ||
commit_parsers = [ | ||
{ message = "^feat", group = "Features" }, | ||
{ message = "^fix", group = "Bug Fixes" }, | ||
{ message = "^perf", group = "Performance" }, | ||
{ body = ".*security", group = "Security" }, | ||
{ body = "$^", 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 = true | ||
# regex 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 = false | ||
# sort the commits inside sections by oldest/newest order | ||
sort_commits = "oldest" | ||
|
||
[remote.github] | ||
owner = "rare-magma" | ||
repo = "guitos" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters