Skip to content

Commit 79885f8

Browse files
authored
ci(publish): fix release configurations (#1446)
1 parent 7296f20 commit 79885f8

File tree

2 files changed

+13
-14
lines changed

2 files changed

+13
-14
lines changed

.github/workflows/cd-publish.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ jobs:
4545
- name: "[VERSION] Bump & Commit"
4646
run: |
4747
nix develop --command uv version ${{ github.event.inputs.version }}
48-
nix develop --command git-cliff -c cliff.toml \
48+
nix develop --command git-cliff -c cliff.toml -u \
4949
--tag v${{ github.event.inputs.version }} \
50-
-o CHANGELOG.md
50+
-p CHANGELOG.md
5151
5252
git commit -am "chore: prepare release v${{ github.event.inputs.version }}" || echo "no changes to commit"
5353
@@ -96,7 +96,7 @@ jobs:
9696
- name: "[CHANGELOG] Generate release notes"
9797
run: |
9898
nix develop --command git-cliff -c cliff.toml \
99-
--unreleased --verbose \
99+
--latest --verbose \
100100
-o dist/RELEASE_NOTES.md
101101
102102
- name: "[VERIFY] Provenance"
@@ -149,6 +149,7 @@ jobs:
149149
name: Publish to PyPI
150150
runs-on: ubuntu-latest
151151
needs: [build]
152+
environment: release
152153
permissions:
153154
id-token: write
154155
steps:

cliff.toml

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@ owner = "amperser"
33
repo = "proselint"
44

55
[changelog]
6-
header = """
7-
[![animation](https://raw.githubusercontent.com/orhun/git-cliff/main/website/static/img/git-cliff-anim.gif)](https://git-cliff.org)\n
8-
"""
6+
header = """# Change Log"""
97

108
body = """
119
{%- macro remote_url() -%}
@@ -19,12 +17,14 @@ body = """
1917
([{{ commit.id | truncate(length=7, end="") }}]({{ self::remote_url() }}/commit/{{ commit.id }}))\
2018
{% endmacro -%}
2119
20+
{% raw %}\n{% endraw %}\
2221
{% if version %}\
2322
{% if previous.version %}\
2423
## [{{ version | trim_start_matches(pat="v") }}]\
2524
({{ self::remote_url() }}/compare/{{ previous.version }}..{{ version }}) - {{ timestamp | date(format="%Y-%m-%d") }}
2625
{% else %}\
27-
## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
26+
## [{{ version | trim_start_matches(pat="v") }}]\
27+
({{ self::remote_url() }}/releases/tag/{{ version }}) - {{ timestamp | date(format="%Y-%m-%d") }}
2828
{% endif %}\
2929
{% else %}\
3030
## [unreleased]
@@ -46,19 +46,17 @@ body = """
4646
{%- if github -%}
4747
{% if github.contributors | filter(attribute="is_first_time", value=true) | length != 0 %}
4848
## New Contributors ❤️
49-
{% endif %}\
5049
{% for contributor in github.contributors | filter(attribute="is_first_time", value=true) %}
5150
* @{{ contributor.username }} made their first contribution
5251
{%- if contributor.pr_number %} in \
5352
[#{{ contributor.pr_number }}]({{ self::remote_url() }}/pull/{{ contributor.pr_number }}) \
5453
{%- endif %}
55-
{%- endfor -%}
54+
{%- endfor -%}\
55+
{% endif %}
5656
{%- endif %}
5757
"""
5858

59-
footer = """
60-
<!-- generated by git-cliff -->
61-
"""
59+
footer = ""
6260

6361
trim = true
6462
postprocessors = [
@@ -67,7 +65,7 @@ postprocessors = [
6765

6866
[git]
6967
conventional_commits = true
70-
filter_unconventional = true
68+
filter_unconventional = false
7169
split_commits = false
7270
commit_preprocessors = [
7371
{ pattern = '\((\w+\s)?#([0-9]+)\)', replace = "([#${2}](<REPO>/issues/${2}))" },
@@ -94,7 +92,7 @@ commit_parsers = [
9492
]
9593
protect_breaking_commits = false
9694
filter_commits = false
97-
tag_pattern = "v[0-9].*"
95+
tag_pattern = "v?\\d+\\.\\d+\\.\\d+"
9896
skip_tags = "beta|alpha"
9997
ignore_tags = "rc"
10098
topo_order = false

0 commit comments

Comments
 (0)