Skip to content

Commit acbd141

Browse files
committed
chore: update Docker workflow and add git-cliff configuration for changelog management
1 parent d158f33 commit acbd141

File tree

3 files changed

+105
-4
lines changed

3 files changed

+105
-4
lines changed

.github/workflows/docker-publish.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,27 @@ jobs:
2020

2121
steps:
2222
- name: Checkout repository
23-
uses: actions/checkout@v3
23+
uses: actions/checkout@v4
2424

2525
- name: Log into registry docker.io
26-
uses: docker/login-action@v2
26+
uses: docker/login-action@v3
2727
with:
2828
registry: docker.io
2929
username: ${{ secrets.DOCKERHUB_USER }}
3030
password: ${{ secrets.DOCKERHUB_TOKEN }}
3131

32+
- name: Build and publish package
33+
uses: actions/setup-node@v3
34+
with:
35+
node-version: 24
36+
registry-url: https://registry.npmjs.org/
37+
38+
- run: git config --global user.email "[email protected]"
39+
- run: git config --global user.name "Eugene Labutin"
40+
- run: npm ci
41+
- run: npm run release
42+
- run: git push && git push --tags
43+
3244
- name: Build and push Docker image
3345
uses: docker/build-push-action@v3
3446
with:

cliff.toml

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# git-cliff ~ default configuration file
2+
# https://git-cliff.org/docs/configuration
3+
#
4+
# Lines starting with "#" are comments.
5+
# Configuration options are organized into tables and keys.
6+
# See documentation for more information on available options.
7+
8+
[changelog]
9+
# changelog header
10+
header = """
11+
# Changelog\n
12+
All notable changes to this project will be documented in this file.\n
13+
"""
14+
# template for the changelog body
15+
# https://keats.github.io/tera/docs/#introduction
16+
body = """
17+
{% if version %}\
18+
## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
19+
{% else %}\
20+
## [unreleased]
21+
{% endif %}\
22+
{% for group, commits in commits | group_by(attribute="group") %}
23+
### {{ group | striptags | trim | upper_first }}
24+
{% for commit in commits %}
25+
- {% if commit.scope %}*({{ commit.scope }})* {% endif %}\
26+
{% if commit.breaking %}[**breaking**] {% endif %}\
27+
{{ commit.message | upper_first }}\
28+
{% endfor %}
29+
{% endfor %}\n
30+
"""
31+
# template for the changelog footer
32+
footer = """
33+
<!-- generated by git-cliff -->
34+
"""
35+
# remove the leading and trailing s
36+
trim = true
37+
# postprocessors
38+
postprocessors = [
39+
# { pattern = '<REPO>', replace = "https://github.com/orhun/git-cliff" }, # replace repository URL
40+
]
41+
42+
[git]
43+
# parse the commits based on https://www.conventionalcommits.org
44+
conventional_commits = true
45+
# filter out the commits that are not conventional
46+
filter_unconventional = true
47+
# process each line of a commit as an individual commit
48+
split_commits = false
49+
# regex for preprocessing the commit messages
50+
commit_preprocessors = [
51+
# Replace issue numbers
52+
#{ pattern = '\((\w+\s)?#([0-9]+)\)', replace = "([#${2}](<REPO>/issues/${2}))"},
53+
# Check spelling of the commit with https://github.com/crate-ci/typos
54+
# If the spelling is incorrect, it will be automatically fixed.
55+
#{ pattern = '.*', replace_command = 'typos --write-changes -' },
56+
]
57+
# regex for parsing and grouping commits
58+
commit_parsers = [
59+
{ message = "^feat", group = "<!-- 0 -->🚀 Features" },
60+
{ message = "^fix", group = "<!-- 1 -->🐛 Bug Fixes" },
61+
{ message = "^doc", group = "<!-- 3 -->📚 Documentation" },
62+
{ message = "^perf", group = "<!-- 4 -->⚡ Performance" },
63+
{ message = "^refactor", group = "<!-- 2 -->🚜 Refactor" },
64+
{ message = "^style", group = "<!-- 5 -->🎨 Styling" },
65+
{ message = "^test", group = "<!-- 6 -->🧪 Testing" },
66+
{ message = "^chore\\(release\\): prepare for", skip = true },
67+
{ message = "^chore\\(deps.*\\)", skip = true },
68+
{ message = "^chore\\(pr\\)", skip = true },
69+
{ message = "^chore\\(pull\\)", skip = true },
70+
{ message = "^chore|^ci", group = "<!-- 7 -->⚙️ Miscellaneous Tasks" },
71+
{ body = ".*security", group = "<!-- 8 -->🛡️ Security" },
72+
{ message = "^revert", group = "<!-- 9 -->◀️ Revert" },
73+
]
74+
# protect breaking changes from being skipped due to matching a skipping commit_parser
75+
protect_breaking_commits = false
76+
# filter out the commits that are not matched by commit parsers
77+
filter_commits = false
78+
# regex for matching git tags
79+
# tag_pattern = "v[0-9].*"
80+
# regex for skipping tags
81+
# skip_tags = ""
82+
# regex for ignoring tags
83+
# ignore_tags = ""
84+
# sort the tags topologically
85+
topo_order = false
86+
# sort the commits inside sections by oldest/newest order
87+
sort_commits = "oldest"
88+
# limit the number of commits included in the changelog.
89+
# limit_commits = 42

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"test:cov": "jest --coverage",
2727
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
2828
"test:e2e": "jest --config ./test/jest-e2e.json",
29-
"release": "standard-version",
29+
"release": "cliff-jumper --name 'ts-fetch' --package-path '.' --no-skip-changelog --no-skip-tag",
3030
"prepare": "husky install"
3131
},
3232
"lint-staged": {
@@ -48,6 +48,7 @@
4848
"devDependencies": {
4949
"@commitlint/cli": "^19.8.1",
5050
"@commitlint/config-conventional": "^19.8.1",
51+
"@favware/cliff-jumper": "^6.0.0",
5152
"@eslint/eslintrc": "^3.3.1",
5253
"@eslint/js": "^9.31.0",
5354
"@nestjs/cli": "^11.0.7",
@@ -73,7 +74,6 @@
7374
"markdownlint-cli": "^0.45.0",
7475
"prettier": "^3.6.2",
7576
"source-map-support": "^0.5.21",
76-
"standard-version": "^9.5.0",
7777
"supertest": "^7.1.3",
7878
"ts-jest": "^29.4.0",
7979
"ts-loader": "^9.5.2",

0 commit comments

Comments
 (0)