Skip to content

Commit

Permalink
fix: 🐛 fix and test changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
darkweaver87 authored Jan 31, 2025
1 parent c3f28c7 commit 7ee3b91
Show file tree
Hide file tree
Showing 6 changed files with 116 additions and 7 deletions.
10 changes: 10 additions & 0 deletions .github/fixtures/changelog-traefik-crds.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
## [crds_v1.1.0](https://github.com/traefik/traefik-helm-chart/compare/crds_v1.0.0...crds_v1.1.0) (2025-01-13)
## :rocket: Features

- feat(CRDs): update CRDs for Traefik Proxy v3.3.x #1303 by @mloiseleur

## :bug: Bug fixes

- fix(CRDs): :bug: bad regexp to generate CRDs release notes #1302 by @darkweaver87


16 changes: 16 additions & 0 deletions .github/fixtures/changelog-traefik.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
## [v34.2.0](https://github.com/traefik/traefik-helm-chart/compare/v34.1.0...v34.2.0) (2025-01-28)
## :rocket: Features

- feat: :sparkles: add hub tracing capabilities #1322 by @darkweaver87

## :bug: Bug fixes

- fix: :bug: permanent redirect should be disableable #1319 by @darkweaver87

## :package: Others

- chore: update issue template #1316 by @mloiseleur
- docs: 📚️ fix typo in Guidelines.md #1320 by @lbarnkow
- chore(release): publish v34.2.0 #1323 by @darkweaver87


8 changes: 4 additions & 4 deletions .github/workflows/changelog.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"title": "## :boom: BREAKING CHANGES",
"rules": [
{
"pattern": ".*\\((${REGEXP}).*\\)!:.*",
"pattern": ".*${REGEXP}!:.*",
"on_property": "title",
"flags": "gu"
}
Expand All @@ -15,7 +15,7 @@
"title": "## :rocket: Features",
"rules": [
{
"pattern": "feat\\((${REGEXP}).*\\):.*",
"pattern": "feat${REGEXP}:.*",
"on_property": "title",
"flags": "gu"
}
Expand All @@ -25,7 +25,7 @@
"title": "## :bug: Bug fixes",
"rules": [
{
"pattern": "fix\\((${REGEXP}).*\\):.*",
"pattern": "fix${REGEXP}:.*",
"on_property": "title",
"flags": "gu"
}
Expand All @@ -35,7 +35,7 @@
"title": "## :package: Others",
"rules": [
{
"pattern": "(chore|release)\\((${REGEXP}).*\\):.*",
"pattern": "(build|chore|ci|docs|style|refactor|perf|test)${REGEXP}:.*",
"on_property": "title",
"flags": "gu"
}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:

- name: Render changelog configuration
env:
REGEXP: "?!CRDs-"
REGEXP: '(\\(.+\\)|(?!\\(CRDs-.+\\)))'
run: |
export DATE=$(date +%F); cat .github/workflows/changelog.json | envsubst > /tmp/changelog.json; cat /tmp/changelog.json
if: steps.tag_exists.outputs.TAG_EXISTS == 'false'
Expand Down Expand Up @@ -183,7 +183,7 @@ jobs:

- name: Render changelog configuration
env:
REGEXP: "CRDs"
REGEXP: '\\((CRDs|CRDs-.+)\\)'
run: |
export DATE=$(date +%F); cat .github/workflows/changelog.json | envsubst > /tmp/changelog.json; cat /tmp/changelog.json
if: steps.tag_exists.outputs.TAG_EXISTS == 'false'
Expand Down
83 changes: 83 additions & 0 deletions .github/workflows/test-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
---
name: Test release

on:
pull_request:
paths:
- .github/fixtures/changelog-traefik.md
- .github/fixtures/changelog-traefik-crds.md
- .github/workflows/release.yaml
- .github/workflows/changelog.json

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Render traefik changelog configuration
env:
REGEXP: '(\\(.+\\)|(?!\\(CRDs-.+\\)))'
run: |
export DATE=2025-01-28; cat .github/workflows/changelog.json | envsubst > /tmp/changelog.json; cat /tmp/changelog.json
- name: Build Changelog
id: changelog
uses: mikepenz/release-changelog-builder-action@v5
with:
fromTag: v34.1.0
toTag: v34.2.0
configuration: "/tmp/changelog.json"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Write changelog
run: |
cat <<EOF > /tmp/changelog.md
${{ steps.changelog.outputs.changelog }}
EOF
- name: Check that the files are the exact same
uses: LouisBrunner/[email protected]
with:
old: .github/fixtures/changelog-traefik.md
new: /tmp/changelog.md
mode: strict
tolerance: same

test-crds:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Render traefik changelog configuration
env:
REGEXP: '\\((CRDs|CRDs-.+)\\)'
run: |
export DATE=2025-01-13; cat .github/workflows/changelog.json | envsubst > /tmp/changelog.json; cat /tmp/changelog.json
- name: Build Changelog
id: changelog
uses: mikepenz/release-changelog-builder-action@v5
with:
fromTag: crds_v1.0.0
toTag: crds_v1.1.0
configuration: "/tmp/changelog.json"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Write changelog
run: |
cat <<EOF > /tmp/changelog.md
${{ steps.changelog.outputs.changelog }}
EOF
- name: Check that the files are the exact same
uses: LouisBrunner/[email protected]
with:
old: .github/fixtures/changelog-traefik-crds.md
new: /tmp/changelog.md
mode: strict
tolerance: same
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Commits messages should follow [conventional commits](https://www.conventionalco
All commits will appear in traefik helm chart changelog with two exceptions:

- CRDs: CRDs are shared between Traefik and CRDs charts, thus, commits with this scope will appear in both charts changelog (e.g. `feat(CRDs): update Traefik Proxy CRDs to v3.x`)
- CRDs-.*: commits with `CRDs-` prefixed scope will appear only on CRDs chart changelog (e.g. `docs(CRDs-values: update values documentation`)
- CRDs-.*: commits with `CRDs-` prefixed scope will appear only on CRDs chart changelog (e.g. `docs(CRDs-values): update values documentation`)

# Statistics

Expand Down

0 comments on commit 7ee3b91

Please sign in to comment.