Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
c7c63d7
CCM-11025: add schemas package
harrim91 Jul 29, 2025
706a8d0
CCM-11025: linting
harrim91 Jul 29, 2025
c8b3f1b
CCM-11025: workflow permissions
harrim91 Jul 29, 2025
d3858ab
CCM-11026: tinker
harrim91 Jul 31, 2025
9cc61e7
CCM-11026: plug package into event publisher
harrim91 Aug 4, 2025
4bf695e
CCM-11026: add version to event files, add jsonschema tests
harrim91 Aug 4, 2025
294a753
Merge branch 'main' into feature/CCM-11026_publish-event-schemas
harrim91 Aug 5, 2025
5cb2e09
CCM-11026: publish on merge
harrim91 Aug 5, 2025
3f5ce0e
CCM-11026: typo
harrim91 Aug 5, 2025
c3794c9
CCM-11026: PR feedbacks
harrim91 Aug 5, 2025
b62478f
CCM-11026: update example event message content
harrim91 Aug 6, 2025
05987ff
CCM-11026: add personalisation params to letter events
harrim91 Aug 6, 2025
5c33780
CCM-11026: fix typecheck config error
harrim91 Aug 6, 2025
733fe9c
Merge branch 'main' into feature/CCM-11026_publish-event-schemas
harrim91 Aug 7, 2025
5a104eb
CCM-11026: don't format schemas in pre-commit
harrim91 Aug 11, 2025
5001739
Merge branch 'main' into feature/CCM-11026_publish-event-schemas
harrim91 Aug 11, 2025
3baed10
Merge branch 'main' into feature/CCM-11026_publish-event-schemas
harrim91 Aug 12, 2025
a8567bf
CCM-11026: tidy package lock
harrim91 Aug 12, 2025
75c87b9
CCM-11026: typecheck fixes
harrim91 Aug 13, 2025
fc94cb9
Merge branch 'main' into feature/CCM-11026_publish-event-schemas
harrim91 Aug 13, 2025
25e2c9b
CCM-11026: bump checkout action version
harrim91 Aug 13, 2025
157a981
Merge branch 'main' into feature/CCM-11026_publish-event-schemas
harrim91 Aug 13, 2025
4f1a71e
Merge branch 'main' into feature/CCM-11026_publish-event-schemas
chris-elliott-nhsd Aug 18, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions .github/workflows/pr_closed.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,60 @@ jobs:
targetAccountGroup: "nhs-notify-template-management-dev"
targetComponent: ${{ matrix.component }}
terraformAction: "apply"

check-event-schemas-version-change:
name: Check for event schemas package version change
needs: check-merge-or-workflow-dispatch
if: needs.check-merge-or-workflow-dispatch.outputs.deploy == 'true'
runs-on: ubuntu-latest
permissions:
contents: read
packages: read
steps:
- name: Checkout code
uses: actions/[email protected]

- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: '20.18.2'
registry-url: 'https://npm.pkg.github.com'

- name: check if local version differs from latest published version
run: |
published_version=$(npm view @nhsdigital/nhs-notify-event-schemas-template-management --json 2>/dev/null | jq -r '.["dist-tags"].latest')
local_version=$(cat packages/event-schemas/package.json | jq -r '.version')
if [[ $local_version = $published_version ]]; then
echo "Local version is the same as the latest published version - skipping publish"
echo "version_changed=false" >> $GITHUB_OUTPUT
else
echo "Local version is different to the latest published version - publishing new version"
echo "version_changed=true" >> $GITHUB_OUTPUT
fi

publish-event-schemas:
name: Publish event schemas package to GitHub package registry
needs: check-event-schemas-version-change
if: needs.check-event-schemas-version-change.outputs.version_changed == 'true'
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Checkout code
uses: actions/[email protected]

- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: '20.18.2'
registry-url: 'https://npm.pkg.github.com'

- name: Install dependencies
run: npm ci

- name: Publish to GitHub Packages
run: npm publish --workspace packages/event-schemas
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ node_modules
# production
/build
dist
*.tgz

# misc
.DS_Store
Expand Down
11 changes: 6 additions & 5 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
{
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
},
"eslint.codeActionsOnSave.mode": "problems",
"eslint.useFlatConfig": false,
"markdownlint.config": {
"MD013": false,
"MD024": {
"siblings_only": true
},
"MD033": false
},
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
},
"eslint.codeActionsOnSave.mode": "problems"
}
}
Loading
Loading