@@ -213,24 +213,98 @@ jobs:
213213 name : cargo nextest
214214 command : TEST_LOG= RUST_LOG=info RUST_LOG_SPAN_EVENTS=full RUST_BACKTRACE=1 cargo nextest run --workspace --failure-output immediate-final --no-fail-fast
215215
216- # changelog:
217- # docker:
218- # - image: orhunp/git-cliff
219216 changelog :
220217 docker :
221- - image : quay.io/influxdb/changelogger:d7093c409adedd8837ef51fa84be0d0f8319177a
218+ - image : cimg/rust:1.75 # git-cliff is written in Rust
222219 steps :
223220 - checkout
221+ Fetch all tags and history for accurate changelog
224222 - run :
225- name : Generate Changelog
223+ name : Fetch git history
226224 command : |
227- PRODUCT=Core changelogger
228- - store_artifacts :
229- path : changelog_artifacts/
230- - persist_to_workspace :
231- root : .
232- paths :
233- - changelog_artifacts
225+ git fetch --depth 10000 --prune --unshallow --tags
226+ # Install git-cliff
227+ - run :
228+ name : Install git-cliff
229+ command : cargo install git-cliff
230+ # Create git-cliff config if it doesn't exist
231+ # - run:
232+ # name: Create git-cliff config
233+ # command: |
234+ # if [ ! -f cliff.toml ]; then
235+ # cat > cliff.toml << 'EOF'
236+ # [changelog]
237+ # header = """
238+ # # Changelog\n
239+ # All notable changes to this project will be documented in this file.\n
240+ # """
241+ # body = """
242+ # {% if version %}\
243+ # ## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
244+ # {% else %}\
245+ # ## [unreleased]
246+ # {% endif %}\
247+ # {% for group, commits in commits | group_by(attribute="group") %}
248+ # ### {{ group | upper_first }}
249+ # {% for commit in commits %}
250+ # - {% if commit.breaking %}[**breaking**] {% endif %}{{ commit.message | upper_first }}\
251+ # {% endfor %}
252+ # {% endfor %}\n
253+ # """
254+ # trim = true
255+ # footer = """
256+ # <!-- generated by git-cliff -->
257+ # """
258+ #
259+ # [git]
260+ # conventional_commits = true
261+ # filter_unconventional = true
262+ # split_commits = false
263+ # commit_parsers = [
264+ # { message = "^feat", group = "Features" },
265+ # { message = "^fix", group = "Bug Fixes" },
266+ # { message = "^doc", group = "Documentation" },
267+ # { message = "^perf", group = "Performance" },
268+ # { message = "^refactor", group = "Refactor" },
269+ # { message = "^style", group = "Styling" },
270+ # { message = "^test", group = "Testing" },
271+ # { message = "^chore\\(release\\): prepare for", skip = true },
272+ # { message = "^chore", group = "Miscellaneous Tasks" },
273+ # { body = ".*security", group = "Security" },
274+ # ]
275+ # protect_breaking_commits = false
276+ # filter_commits = false
277+ # tag_pattern = "v[0-9]*"
278+ # skip_tags = ""
279+ # ignore_tags = ""
280+ # date_order = false
281+ # sort_commits = "oldest"
282+ # EOF
283+ # fi
284+ # Generate changelog
285+ - run :
286+ name : Generate changelog
287+ command : |
288+ git-cliff --output CHANGELOG.md
289+
290+ # changelog:
291+ # docker:
292+ # - image: orhunp/git-cliff
293+ # changelog:
294+ # docker:
295+ # - image: quay.io/influxdb/changelogger:d7093c409adedd8837ef51fa84be0d0f8319177a
296+ # steps:
297+ # - checkout
298+ # - run:
299+ # name: Generate Changelog
300+ # command: |
301+ # PRODUCT=Core changelogger
302+ # - store_artifacts:
303+ # path: changelog_artifacts/
304+ # - persist_to_workspace:
305+ # root: .
306+ # paths:
307+ # - changelog_artifacts
234308
235309 # Build a dev binary.
236310 #
0 commit comments