Skip to content

Commit 493e54b

Browse files
Adding libs examples.
1 parent a7b2f83 commit 493e54b

39 files changed

+3414
-2
lines changed

.editorconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,13 @@ trim_trailing_whitespace = unset
5757
indent_style = unset
5858
indent_size = unset
5959
generated_code = true
60+
61+
[*.sln]
62+
generated_code = true
63+
charset = unset
64+
end_of_line = unset
65+
insert_final_newline = unset
66+
trim_trailing_whitespace = unset
67+
indent_style = unset
68+
indent_size = unset
69+
generated_code = true
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: "Build libraries"
2+
description: "build libraries"
3+
inputs:
4+
version:
5+
description: "Version number"
6+
required: true
7+
runs:
8+
using: "composite"
9+
steps:
10+
- name: Checkout
11+
uses: actions/checkout@v4
12+
- uses: actions/setup-node@v4
13+
with:
14+
node-version: 24
15+
16+
- name: Npm install
17+
working-directory: .
18+
run: npm ci
19+
shell: bash
20+
21+
- name: Build servers
22+
working-directory: ./src/server
23+
shell: bash
24+
run: |
25+
make build VERSION="${{ inputs.version }}"
26+
27+
- name: Upload abstractions artifact
28+
uses: actions/upload-artifact@v4
29+
with:
30+
path: "src/server/abstractions/bin/Release
31+
name: libs-abstractions-${{ inputs.version }}
32+
33+
- name: Upload data artifact
34+
uses: actions/upload-artifact@v4
35+
with:
36+
path: "src/server/data/bin/Release
37+
name: libs-data-${{ inputs.version }}
38+
39+
- name: Upload letter artifact
40+
uses: actions/upload-artifact@v4
41+
with:
42+
path: "src/server/letter/bin/Release"
43+
name: libs-letter-${{ inputs.version }}
44+
45+
- name: Upload host artifact
46+
uses: actions/upload-artifact@v4
47+
with:
48+
path: "src/server/host/bin/Release
49+
name: libs-host-${{ inputs.version }}

.github/actions/build-server/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ runs:
2929
run: |
3030
make build VERSION="${{ inputs.version }}"
3131
32-
- name: Upload csharp-server artifact
32+
- name: Upload csharp-server artifact
3333
uses: actions/upload-artifact@v4
3434
with:
3535
path: "server/csharp-server"

.github/workflows/stage-5-publish.yaml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,3 +351,58 @@ jobs:
351351
message-title: "Notification title"
352352
message-text: "This is a notification body"
353353
link: ${{ github.event.pull_request.html_url }}
354+
355+
356+
### PUBLISH LIBS ABSTRACTION NUGET
357+
publishlibsabstractionsnuget:
358+
name: "Publish libs abstractions packages to nuget.pkg.github.com"
359+
runs-on: ubuntu-latest
360+
needs: [publish]
361+
permissions:
362+
packages: write
363+
contents: read
364+
steps:
365+
- name: "Get the artefacts"
366+
uses: actions/download-artifact@v4
367+
with:
368+
path: .
369+
name: libs-abstractions-${{ inputs.version }}
370+
- run: ls -la
371+
- run: |
372+
dotnet nuget add source \
373+
--username nhs-notify-supplier-api \
374+
--password ${{ secrets.GITHUB_TOKEN }} \
375+
--store-password-in-clear-text \
376+
--name github \
377+
"https://nuget.pkg.github.com/NHSDigital/index.json"
378+
- run: |
379+
echo "ROOT .version file is: $(cat .version)"
380+
echo "GH variable version is: ${{ inputs.version }}"
381+
name: Showing the base versions
382+
383+
- run: |
384+
VERSION=${{ inputs.version }}
385+
SHORT_VERSION="$(echo $VERSION | rev | cut -d"." -f2- | rev)"
386+
NUGET_VERSION="$(echo "$VERSION" | tr + .)"
387+
echo $VERSION
388+
echo $SHORT_VERSION
389+
echo $NUGET_VERSION
390+
SHORT_NUGET_VERSION="$(echo $NUGET_VERSION | rev | cut -d"." -f2- | rev)"
391+
echo $SHORT_NUGET_VERSION
392+
SHORTER_NUGET_VERSION="$(echo $SHORT_NUGET_VERSION | rev | cut -d"." -f2- | rev)"
393+
echo $SHORTER_NUGET_VERSION
394+
TEST_NUGET_VERSION="$(echo $NUGET_VERSION | sed -E 's/.([^.]*)$/\1/')"
395+
TEST_NUGET_VERSION="$(echo $TEST_NUGET_VERSION | sed -E 's/.([^.]*)$/\1/')"
396+
echo $TEST_NUGET_VERSION
397+
echo "TEST_NUGET_VERSION=$TEST_NUGET_VERSION" >> "$GITHUB_OUTPUT"
398+
name: Set the nuget version
399+
id: set-nuget-version
400+
401+
- run: |
402+
dotnet nuget push \
403+
nhs.notify.suppliers.api.abstractions.${TEST_NUGET_VERSION}.nupkg \
404+
--source github \
405+
--api-key $GITHUB_TOKEN
406+
env:
407+
TEST_NUGET_VERSION: ${{ steps.set-nuget-version.outputs.TEST_NUGET_VERSION }}
408+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

scripts/config/pre-commit.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ repos:
1616
exclude: |
1717
(?x)^(
1818
sdk/.* |
19-
someotherdir/.*
19+
someotherdir/.* |
20+
src/server/host/Properties/launchSettings.json
2021
)$
2122
2223
# - id: ...

0 commit comments

Comments
 (0)