Adjusted config and added build action

This commit is contained in:
Luke Hagar
2023-10-26 21:08:47 -05:00
parent 2b3f41567e
commit 4d893a805b
2 changed files with 47 additions and 5 deletions

View File

@@ -0,0 +1,40 @@
name: Generate SDKs using liblab
on:
push:
branches:
- main
paths:
- plex-media-server-spec-dereferenced.yaml
# Add any other triggers you want here, such as a push to the spec file
workflow_call:
workflow_dispatch:
jobs:
build-and-pr:
name: Generate SDKs and create PRs
runs-on: ubuntu-latest
env:
LIBLAB_TOKEN: ${{ secrets.LIBLAB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.SDK_TOKEN }}
environment: development
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: "18" # Specify the node version you want to use
- name: Install liblab
run: npm install -g liblab
- name: Validate Config and Spec
run: liblab validate
- name: Start Build
run: liblab build --skip-validation --approve-docs
- name: Create PRs to GitHub repos
run: liblab pr

View File

@@ -1,5 +1,5 @@
{ {
"sdkName": "plexsdk", "sdkName": "PlexSDK",
"specFilePath": "./plex-media-server-spec-dereferenced.yaml", "specFilePath": "./plex-media-server-spec-dereferenced.yaml",
"languages": ["python", "typescript", "java"], "languages": ["python", "typescript", "java"],
"createDocs": true, "createDocs": true,
@@ -26,7 +26,7 @@
}, },
"languageOptions": { "languageOptions": {
"typescript": { "typescript": {
"npmName": "plex-typescript-sdk", "npmName": "plexjs",
"npmOrg": "lukehagar", "npmOrg": "lukehagar",
"httpClient": "axios", "httpClient": "axios",
"bundle": false, "bundle": false,
@@ -42,7 +42,7 @@
] ]
}, },
"python": { "python": {
"pypiPackageName": "plex-python-sdk", "pypiPackageName": "plexpy",
"alwaysInitializeOptionals": false, "alwaysInitializeOptionals": false,
"githubRepoName": "plexpy", "githubRepoName": "plexpy",
"sdkVersion": "0.0.1", "sdkVersion": "0.0.1",
@@ -55,10 +55,12 @@
] ]
}, },
"java": { "java": {
"githubRepoName": "plex-java-sdk", "githubRepoName": "plexjava",
"sdkVersion": "0.0.1", "sdkVersion": "0.0.1",
"groupId": "plex.lukehagar",
"ignoreFiles": [], "ignoreFiles": [],
"java": {
"groupId": "sdk.plex"
},
"authors": [ "authors": [
{ {
"name": "Luke Hagar", "name": "Luke Hagar",