mirror of
https://github.com/LukeHagar/plexjs.git
synced 2025-12-06 12:37:46 +00:00
Action and folder cleanup
This commit is contained in:
12
.github/workflows/build_pr.yml
vendored
12
.github/workflows/build_pr.yml
vendored
@@ -26,17 +26,17 @@ jobs:
|
|||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: "16"
|
node-version: "16"
|
||||||
|
|
||||||
- name: Build TS SDK
|
- name: Build TS SDK
|
||||||
id: buildTS
|
id: buildTS
|
||||||
run: |
|
run: |
|
||||||
wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/6.3.0/openapi-generator-cli-6.3.0.jar -O openapi-generator-cli.jar
|
rm -rf plexjs/
|
||||||
rm -rf sdk-output/
|
java -jar openapi-generator-cli.jar generate -i api-specs/referenced/plex-api-spec.yaml -g typescript-axios -o plexjs/ --global-property skipFormModel=false --config config.yaml
|
||||||
java -jar openapi-generator-cli.jar generate -i api-specs/referenced/plex-api-spec.yaml -g typescript-axios -o sdk-output/ --global-property skipFormModel=false --config config.yaml
|
|
||||||
|
|
||||||
- name: Run npm install and build Typescript SDK
|
- name: Run npm install and build Typescript SDK
|
||||||
id: buildSDK
|
id: buildSDK
|
||||||
if: steps.buildTS.outcome == 'success'
|
if: steps.buildTS.outcome == 'success'
|
||||||
run: |
|
run: |
|
||||||
|
cd plexjs
|
||||||
npm install
|
npm install
|
||||||
npm run build
|
npm run build
|
||||||
|
|||||||
13
.github/workflows/bump_version.yml
vendored
13
.github/workflows/bump_version.yml
vendored
@@ -19,14 +19,13 @@ jobs:
|
|||||||
ref: ${{ github.ref }}
|
ref: ${{ github.ref }}
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
|
|
||||||
- name: Checkout API Specs Repo
|
- name: Checkout API Specs Repo
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
repository: lukehagar/plex-api-spec
|
repository: lukehagar/plex-api-spec
|
||||||
path: api-specs
|
path: api-specs
|
||||||
ref: main
|
ref: main
|
||||||
|
|
||||||
- name: Set up Node
|
- name: Set up Node
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
@@ -67,17 +66,17 @@ jobs:
|
|||||||
- name: Build TS SDK
|
- name: Build TS SDK
|
||||||
id: buildTS
|
id: buildTS
|
||||||
run: |
|
run: |
|
||||||
wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/6.3.0/openapi-generator-cli-6.3.0.jar -O openapi-generator-cli.jar
|
rm -rf plexjss/
|
||||||
rm -rf sdk-output/
|
java -jar openapi-generator-cli.jar generate -i api-specs/referenced/plex-api-spec.yaml -g typescript-axios -o plexjs/ --global-property skipFormModel=false --config config.yaml
|
||||||
java -jar openapi-generator-cli.jar generate -i api-specs/referenced/plex-api-spec.yaml -g typescript-axios -o sdk-output/ --global-property skipFormModel=false --config config.yaml
|
|
||||||
|
|
||||||
- name: After SDK Build
|
- name: After SDK Build
|
||||||
id: buildSDK
|
id: buildSDK
|
||||||
if: steps.buildTS.outcome == 'success'
|
if: steps.buildTS.outcome == 'success'
|
||||||
run: |
|
run: |
|
||||||
|
cd plexjs
|
||||||
npm install
|
npm install
|
||||||
npm run build
|
npm run build
|
||||||
|
|
||||||
- name: Commit changes and create new version tag
|
- name: Commit changes and create new version tag
|
||||||
if: steps.buildSDK.outcome == 'success'
|
if: steps.buildSDK.outcome == 'success'
|
||||||
uses: stefanzweifel/git-auto-commit-action@v4
|
uses: stefanzweifel/git-auto-commit-action@v4
|
||||||
|
|||||||
5
.github/workflows/publish-to-npm.yml
vendored
5
.github/workflows/publish-to-npm.yml
vendored
@@ -7,14 +7,15 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
# Setup .npmrc file to publish to npm
|
|
||||||
- uses: actions/setup-node@v3
|
- uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: 12
|
node-version: 12
|
||||||
- run: |
|
- run: |
|
||||||
|
cd plexjs
|
||||||
npm ci
|
npm ci
|
||||||
|
|
||||||
- id: publish
|
- id: publish
|
||||||
uses: JS-DevTools/npm-publish@v1
|
uses: JS-DevTools/npm-publish@v1
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.NPM_TOKEN }}
|
token: ${{ secrets.NPM_TOKEN }}
|
||||||
package: ./package.json
|
package: ./plexjs/package.json
|
||||||
|
|||||||
@@ -1,24 +1,31 @@
|
|||||||
{
|
{
|
||||||
"name": "{{npmName}}",
|
"name": "{{npmName}}",
|
||||||
"version": "{{npmVersion}}",
|
"version": "{{npmVersion}}",
|
||||||
"description": "OpenAPI client for {{npmName}}",
|
"description": "Community Made Plex JS/TS Module",
|
||||||
"author": "OpenAPI-Generator Contributors",
|
"author": "Luke Hagar",
|
||||||
|
"type": "module",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://{{gitHost}}/{{gitUserId}}/{{gitRepoId}}.git"
|
"url": "https://github.com/LukeHagar/plexjs.git"
|
||||||
},
|
},
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"axios",
|
"axios",
|
||||||
"typescript",
|
"typescript",
|
||||||
"openapi-client",
|
"openapi",
|
||||||
"openapi-generator",
|
"api",
|
||||||
|
"plex",
|
||||||
|
"plex media server",
|
||||||
|
"pms"
|
||||||
"{{npmName}}"
|
"{{npmName}}"
|
||||||
],
|
],
|
||||||
"license": "Unlicense",
|
"license": "MIT",
|
||||||
"main": "../dist/index.js",
|
"bugs": {
|
||||||
"typings": "../dist/index.d.ts",
|
"url": "https://github.com/LukeHagar/plexjs/issues"
|
||||||
|
},
|
||||||
|
"main": "./dist/index.js",
|
||||||
|
"typings": "./dist/index.d.ts",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsc --outDir dist/",
|
"build": "tsc --outDir ./dist/",
|
||||||
"prepare": "npm run build"
|
"prepare": "npm run build"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
"target": "{{#supportsES6}}ES6{{/supportsES6}}{{^supportsES6}}ES5{{/supportsES6}}",
|
"target": "{{#supportsES6}}ES6{{/supportsES6}}{{^supportsES6}}ES5{{/supportsES6}}",
|
||||||
"module": "{{#supportsES6}}ES6{{/supportsES6}}{{^supportsES6}}CommonJS{{/supportsES6}}",
|
"module": "{{#supportsES6}}ES6{{/supportsES6}}{{^supportsES6}}CommonJS{{/supportsES6}}",
|
||||||
"noImplicitAny": true,
|
"noImplicitAny": true,
|
||||||
"outDir": "dist",
|
"outDir": "./dist",
|
||||||
"rootDir": ".",
|
"rootDir": ".",
|
||||||
{{^supportsES6}}
|
{{^supportsES6}}
|
||||||
"lib": [
|
"lib": [
|
||||||
|
|||||||
Reference in New Issue
Block a user