Skip to content

Commit

Permalink
chore: wip
Browse files Browse the repository at this point in the history
  • Loading branch information
mint-dewit committed May 1, 2024
1 parent 43adc8d commit 618ce57
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 3 deletions.
36 changes: 34 additions & 2 deletions .github/workflows/node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -618,6 +618,21 @@ jobs:
yarn build
env:
CI: true
- name: Generate OpenAPI client library
if: ${{ steps.do-publish.outputs.tag }}
uses: hatamiarash7/openapi-generator@v0.3.0
with:
generator: typescript-fetch
openapi-file: ./packages/openapi/api/actions.yaml
output-dir: ./packages/openapi/client/ts
command-args: -p supportsES6=true
- name: Build OpenAPI client library
if: ${{ steps.do-publish.outputs.tag }}
run: |
cd packages/openapi
yarn build:main
env:
CI: true
- name: Modify dependencies to use npm packages
run: node scripts/prepublish.js
- name: Publish to NPM
Expand Down Expand Up @@ -673,16 +688,33 @@ jobs:
env:
CI: true

build-stable-api:
name: Build OpenAPI typescript client
release-openapi-lib:
name: Build and release OpenAPI typescript client
runs-on: ubuntu-latest
continue-on-error: true
timeout-minutes: 15

# only run for tags
if: contains(github.ref, 'refs/tags/')

steps:
- uses: actions/checkout@v4
with:
persist-credentials: false

- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version-file: ".node-version"
- name: Prepare Environment # have to run this first to make sure the semver lib is available
run: |
yarn config set cacheFolder /home/runner/release-libs-cache
cd packages
yarn install
env:
CI: true

- name: Generate code
uses: hatamiarash7/openapi-generator@v0.3.0
with:
Expand Down
15 changes: 15 additions & 0 deletions .github/workflows/prerelease-libs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,21 @@ jobs:
yarn build
env:
CI: true
- name: Generate OpenAPI client library
if: ${{ steps.do-publish.outputs.tag }}
uses: hatamiarash7/openapi-generator@v0.3.0
with:
generator: typescript-fetch
openapi-file: ./packages/openapi/api/actions.yaml
output-dir: ./packages/openapi/client/ts
command-args: -p supportsES6=true
- name: Build OpenAPI client library
if: ${{ steps.do-publish.outputs.tag }}
run: |
cd packages/openapi
yarn build:main
env:
CI: true
- name: Modify dependencies to use npm packages
run: node scripts/prepublish.js
- name: Publish to NPM
Expand Down
1 change: 0 additions & 1 deletion packages/openapi/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "@sofie-automation/openapi",
"version": "1.50.1",
"private": true,
"license": "MIT",
"repository": {
"type": "git",
Expand Down

0 comments on commit 618ce57

Please sign in to comment.