Skip to content

Commit b4ba7de

Browse files
Merge pull request #184 from NHSDigital/feature/axkr1-NRL-1544-automatic-build-artifacts
NRL-1544 Automatic build of documentation
2 parents 5fe011e + eecce09 commit b4ba7de

1 file changed

Lines changed: 27 additions & 6 deletions

File tree

.github/workflows/continuous-integration.yml

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,26 @@
11
name: Create Release
2-
on: push
2+
on:
3+
push:
4+
branches:
5+
- master
36

47
jobs:
58
create_release:
69
name: build
710
runs-on: ubuntu-latest
8-
if: github.ref == 'refs/heads/master'
911
steps:
1012
- name: Checkout
1113
uses: actions/checkout@v2
1214
with:
13-
fetch-depth: 0 # This causes all history to be fetched, which is required for calculate-version to function
15+
fetch-depth: 0 # This causes all history to be fetched, which is required for calculate-version to function
1416

1517
- name: Install Python 3.12
1618
uses: actions/setup-python@v1
1719
with:
1820
python-version: 3.12
1921

2022
- name: Upgrade python pip
21-
run: python -m pip install --upgrade pip
23+
run: python -m pip install --upgrade pip
2224

2325
- name: Install git
2426
run: pip install gitpython
@@ -33,12 +35,31 @@ jobs:
3335

3436
- name: Create release (master only)
3537
id: create-release
36-
if: github.ref == 'refs/heads/master'
3738
uses: actions/create-release@v1
38-
continue-on-error: true
3939
env:
4040
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4141
with:
4242
tag_name: ${{ env.SPEC_VERSION }}
4343
release_name: ${{ env.SPEC_VERSION }}
4444

45+
- name: Set up Node.js
46+
uses: actions/setup-node@v4
47+
with:
48+
node-version: '24'
49+
50+
- name: Install dependencies
51+
run: make install-node
52+
53+
- name: Run publish
54+
run: make publish
55+
56+
- name: Upload documentation asset to release
57+
uses: actions/upload-release-asset@v1
58+
env:
59+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
60+
with:
61+
upload_url: ${{ steps.create-release.outputs.upload_url }}
62+
asset_path: build/nrl-consumer-api.json
63+
asset_name: nrl-consumer-api.json
64+
asset_content_type: application/json
65+

0 commit comments

Comments
 (0)