Skip to content

Commit 618ce57

Browse files
author
Mint de Wit
committed
chore: wip
1 parent 43adc8d commit 618ce57

File tree

3 files changed

+49
-3
lines changed

3 files changed

+49
-3
lines changed

.github/workflows/node.yaml

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -618,6 +618,21 @@ jobs:
618618
yarn build
619619
env:
620620
CI: true
621+
- name: Generate OpenAPI client library
622+
if: ${{ steps.do-publish.outputs.tag }}
623+
uses: hatamiarash7/[email protected]
624+
with:
625+
generator: typescript-fetch
626+
openapi-file: ./packages/openapi/api/actions.yaml
627+
output-dir: ./packages/openapi/client/ts
628+
command-args: -p supportsES6=true
629+
- name: Build OpenAPI client library
630+
if: ${{ steps.do-publish.outputs.tag }}
631+
run: |
632+
cd packages/openapi
633+
yarn build:main
634+
env:
635+
CI: true
621636
- name: Modify dependencies to use npm packages
622637
run: node scripts/prepublish.js
623638
- name: Publish to NPM
@@ -673,16 +688,33 @@ jobs:
673688
env:
674689
CI: true
675690

676-
build-stable-api:
677-
name: Build OpenAPI typescript client
691+
release-openapi-lib:
692+
name: Build and release OpenAPI typescript client
678693
runs-on: ubuntu-latest
679694
continue-on-error: true
680695
timeout-minutes: 15
696+
697+
# only run for tags
698+
if: contains(github.ref, 'refs/tags/')
699+
681700
steps:
682701
- uses: actions/checkout@v4
683702
with:
684703
persist-credentials: false
685704

705+
- name: Use Node.js
706+
uses: actions/setup-node@v4
707+
with:
708+
node-version-file: ".node-version"
709+
- name: Prepare Environment # have to run this first to make sure the semver lib is available
710+
run: |
711+
yarn config set cacheFolder /home/runner/release-libs-cache
712+
713+
cd packages
714+
yarn install
715+
env:
716+
CI: true
717+
686718
- name: Generate code
687719
uses: hatamiarash7/[email protected]
688720
with:

.github/workflows/prerelease-libs.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,21 @@ jobs:
131131
yarn build
132132
env:
133133
CI: true
134+
- name: Generate OpenAPI client library
135+
if: ${{ steps.do-publish.outputs.tag }}
136+
uses: hatamiarash7/[email protected]
137+
with:
138+
generator: typescript-fetch
139+
openapi-file: ./packages/openapi/api/actions.yaml
140+
output-dir: ./packages/openapi/client/ts
141+
command-args: -p supportsES6=true
142+
- name: Build OpenAPI client library
143+
if: ${{ steps.do-publish.outputs.tag }}
144+
run: |
145+
cd packages/openapi
146+
yarn build:main
147+
env:
148+
CI: true
134149
- name: Modify dependencies to use npm packages
135150
run: node scripts/prepublish.js
136151
- name: Publish to NPM

packages/openapi/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
22
"name": "@sofie-automation/openapi",
33
"version": "1.50.1",
4-
"private": true,
54
"license": "MIT",
65
"repository": {
76
"type": "git",

0 commit comments

Comments
 (0)