Skip to content

Commit 0cfdf9b

Browse files
authored
Chore: [AEA-0000] - Publish release notes to gh pages (#57)
## Summary - Routine Change ### Details - publish release notes to gh-pages
1 parent 693bca9 commit 0cfdf9b

File tree

4 files changed

+64
-63
lines changed

4 files changed

+64
-63
lines changed

.github/workflows/tag-release.yml

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,11 +352,52 @@ jobs:
352352
id: ${{ steps.get_release.outputs.id }}
353353
body: |
354354
## Info
355-
[See code diff](${{ github.event.compare }})
356355
[Release workflow run](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) - Workflow ID: ${{ github.run_id }}
357356
358357
It was initialized by [${{ github.event.sender.login }}](${{ github.event.sender.html_url }})
359358
359+
- name: Checkout gh-pages branch
360+
if: ${{ !inputs.dry_run }}
361+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
362+
with:
363+
repository: ${{ github.repository }}
364+
ref: gh-pages
365+
path: gh-pages
366+
367+
- name: Publish release notes to gh-pages
368+
if: ${{ !inputs.dry_run }}
369+
working-directory: gh-pages
370+
env:
371+
RELEASE_ID: ${{ steps.get_release.outputs.id }}
372+
VERSION_TAG: ${{ steps.output_version_tag.outputs.VERSION_TAG }}
373+
GH_REPO: ${{ github.repository }}
374+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
375+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
376+
run: |
377+
set -euo pipefail
378+
notes_dir="release_notes"
379+
mkdir -p "$notes_dir"
380+
note_file="$notes_dir/${VERSION_TAG}.md"
381+
382+
gh api "/repos/${GH_REPO}/releases/${RELEASE_ID}" | jq -r '.body // ""' > "$note_file"
383+
384+
if [ ! -s "$note_file" ]; then
385+
echo "Release notes are empty; skipping gh-pages update."
386+
exit 0
387+
fi
388+
389+
git config user.name "github-actions[bot]"
390+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
391+
392+
git add -f "$note_file"
393+
if git diff --cached --quiet; then
394+
echo "No changes detected in release notes; skipping commit."
395+
exit 0
396+
fi
397+
398+
git commit -m "docs: add release notes for ${VERSION_TAG}"
399+
parallel --retries 10 --delay 3 ::: "git pull --rebase && git push"
400+
360401
- name: Output Change Set Version
361402
id: output_change_set_version
362403
shell: bash

.trivyignore.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,9 @@ vulnerabilities:
77
- id: CVE-2026-25128
88
statement: fast-xml-parser vulnerability accepted as risk - dependency of aws-sdk/client-dynamodb
99
expired_at: 2026-03-01
10+
- id: CVE-2026-25547
11+
statement: isaacs/brace-expansion vulnerability accepted as risk - dependency of semantic-release
12+
expired_at: 2026-03-01
13+
- id: CVE-2026-0775
14+
statement: npm vulnerability accepted as risk - dependency of semantic-release
15+
expired_at: 2026-03-01

poetry.lock

Lines changed: 10 additions & 58 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,12 @@ repository = "https://github.com/NHSDigital/eps-common-workflows"
1717

1818
[tool.poetry.dependencies]
1919
python = "^3.14"
20-
pre-commit = "^4.5.1"
2120
requests = "^2.32.5"
2221

23-
[tool.poetry.group.dev.dependencies]
24-
pip-licenses = "^5.0.0"
25-
2622
[tool.poetry.scripts]
23+
24+
25+
[dependency-groups]
26+
dev = [
27+
"pre-commit (>=4.5.1,<5.0.0)"
28+
]

0 commit comments

Comments
 (0)