Skip to content

Commit 5567061

Browse files
committed
chore: Configure Github actions; Generate CHANGELOG.md
1 parent 90fa872 commit 5567061

File tree

3 files changed

+127
-0
lines changed

3 files changed

+127
-0
lines changed

.github/workflows/release.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Release
2+
3+
permissions:
4+
contents: write
5+
6+
on:
7+
push:
8+
tags:
9+
- v[0-9]+.*
10+
11+
jobs:
12+
push_crates_io:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v3
16+
17+
- uses: actions-rs/toolchain@v1
18+
with:
19+
toolchain: stable
20+
override: true
21+
22+
- uses: katyo/publish-crates@v2
23+
with:
24+
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}
25+
ignore-unpublished-changes: true
26+
27+
create-release:
28+
runs-on: ubuntu-latest
29+
steps:
30+
- uses: actions/checkout@v3
31+
32+
- uses: taiki-e/create-gh-release-action@v1
33+
with:
34+
changelog: CHANGELOG.md
35+
token: ${{ secrets.GITHUB_TOKEN }}

CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
## [0.1.0] - 2023-03-06
6+
7+
### Documentation
8+
9+
- Update README.md
10+
11+
### Features
12+
13+
- Bootstrap the app with clap. Implement the refresh function.
14+
- Add the `--refresh` argument to force a cache refresh before running the command
15+
- Add command to generate shell completions
16+
17+
### Miscellaneous Tasks
18+
19+
- Exit without returning a project upon user abort

cliff.toml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# configuration file for git-cliff
2+
# see https://github.com/orhun/git-cliff#configuration-file
3+
4+
[changelog]
5+
# changelog header
6+
header = """
7+
# Changelog\n
8+
All notable changes to this project will be documented in this file.\n
9+
"""
10+
# template for the changelog body
11+
# https://tera.netlify.app/docs/#introduction
12+
body = """
13+
{% if version %}\
14+
## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
15+
{% else %}\
16+
## [unreleased]
17+
{% endif %}\
18+
{% for group, commits in commits | group_by(attribute="group") %}
19+
### {{ group | upper_first }}
20+
{% for commit in commits %}
21+
- {% if commit.breaking %}[**breaking**] {% endif %}{{ commit.message | upper_first }}\
22+
{% endfor %}
23+
{% endfor %}\n
24+
"""
25+
# remove the leading and trailing whitespace from the template
26+
trim = true
27+
# changelog footer
28+
# footer = """
29+
# <!-- generated by git-cliff -->
30+
# """
31+
32+
[git]
33+
# parse the commits based on https://www.conventionalcommits.org
34+
conventional_commits = true
35+
# filter out the commits that are not conventional
36+
filter_unconventional = true
37+
# process each line of a commit as an individual commit
38+
split_commits = false
39+
# regex for preprocessing the commit messages
40+
commit_preprocessors = [
41+
{ pattern = '\((\w+\s)?#([0-9]+)\)', replace = "([#${2}](https://github.com/BapRx/gsp/issues/${2}))" },
42+
]
43+
# regex for parsing and grouping commits
44+
commit_parsers = [
45+
{ message = "^feat", group = "Features" },
46+
{ message = "^fix", group = "Bug Fixes" },
47+
{ message = "^doc", group = "Documentation" },
48+
{ message = "^perf", group = "Performance" },
49+
{ message = "^refactor", group = "Refactor" },
50+
{ message = "^style", group = "Styling" },
51+
{ message = "^test", group = "Testing" },
52+
{ message = "^chore\\(release\\): prepare for", skip = true },
53+
{ message = "^chore", group = "Miscellaneous Tasks" },
54+
{ message = "^ci", group = "CI/CD" },
55+
{ body = ".*security", group = "Security" },
56+
{ message = ".*", group = "Other", default_scope = "other" },
57+
]
58+
# protect breaking changes from being skipped due to matching a skipping commit_parser
59+
protect_breaking_commits = false
60+
# filter out the commits that are not matched by commit parsers
61+
filter_commits = false
62+
# glob pattern for matching git tags
63+
tag_pattern = "v[0-9]*"
64+
# regex for skipping tags
65+
skip_tags = "v0.1.0-beta.1"
66+
# regex for ignoring tags
67+
ignore_tags = ""
68+
# sort the tags topologically
69+
topo_order = false
70+
# sort the commits inside sections by oldest/newest order
71+
sort_commits = "oldest"
72+
# limit the number of commits included in the changelog.
73+
# limit_commits = 42

0 commit comments

Comments
 (0)