Skip to content

Commit 9b48773

Browse files
committed
CCM-13419 Generate specification variants on build
1 parent 6b9c7a1 commit 9b48773

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

.github/workflows/pr_closed.yaml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,3 +157,39 @@ jobs:
157157
run: npm publish --workspace internal/events
158158
env:
159159
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
160+
161+
162+
publish-api-specs:
163+
name: Generate and publish API specs to APIM pre-release artefacts
164+
#if: needs.check-merge-or-workflow-dispatch.outputs.deploy == 'true'
165+
runs-on: ubuntu-latest
166+
permissions:
167+
contents: read
168+
packages: write
169+
strategy:
170+
matrix:
171+
apim-env: [internal-dev, int, ref, prod]
172+
steps:
173+
- name: Checkout code
174+
uses: actions/[email protected]
175+
176+
- name: Set up Node.js
177+
uses: actions/setup-node@v4
178+
with:
179+
node-version: 22
180+
181+
- name: Install dependencies
182+
working-directory: .
183+
run: npm ci
184+
shell: bash
185+
186+
- name: Generate OpenAPI specification
187+
run: |
188+
echo "Building env specific OAS spec"
189+
make build-json-oas-spec APIM_ENV=${{ matrix.apim-env }}
190+
191+
- name: Upload API spec artefact
192+
uses: actions/upload-artifact@v4
193+
with:
194+
name: ${{ matrix.apim-env }}-build-output
195+
path: ./build

0 commit comments

Comments
 (0)