-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
953af21
commit fa59a10
Showing
6 changed files
with
138 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: publish npm | ||
|
||
on: | ||
push: | ||
tags: | ||
- v*.*.* | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
publish-npm: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: 16 | ||
registry-url: https://registry.npmjs.org/ | ||
- name: Get version | ||
id: get_version | ||
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} | ||
- name: Set version | ||
run: | | ||
apt install jq | ||
jq '.version="${{ steps.get_version.outputs.VERSION }}"' package.json > package.json.new | ||
mv package.json.new package.json | ||
- name: Generate SDK | ||
run: | | ||
npm cache clean --force | ||
npm install @openapitools/openapi-generator-cli -g | ||
make build | ||
- run: npm i | ||
- run: npm run start | ||
- run: npm publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{secrets.npm_token}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,3 +19,8 @@ dist/ | |
target/ | ||
codegen/ | ||
__debug_bin | ||
|
||
node_modules/ | ||
dist/ | ||
.idea | ||
.package-lock.json |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{ | ||
"name": "casaos-messagebus-openapi", | ||
"version": "0.0.1", | ||
"scripts": { | ||
"build": "rm -rf dist && tsc && rm -rf generate", | ||
"generate:local": "openapi-generator-cli generate -g typescript-axios -i ./api/message_bus/openapi.yaml -o ./generate", | ||
"generate:npx": "npx @openapitools/openapi-generator-cli generate -g typescript-axios -i ./api/message_bus/openapi.yaml -o ./generate", | ||
"generate:ts": "npx openapi-typescript-codegen --input ./api/message_bus/openapi.yaml --output ./generate", | ||
"publish": "npm publish --access public", | ||
"start": "yarn generate:ts && yarn build" | ||
}, | ||
"homepage": "https://github.com/IceWhaleTech/CasaOS-MessageBus#readme", | ||
"description": "Casaos-MessageBus Typescript+Axios SDK", | ||
"keywords": [ | ||
"CasaOS-MessageBus", | ||
"SDK", | ||
"CasaOS-MessageBus Axios" | ||
], | ||
"main": "dist/index", | ||
"files": [ | ||
"LICENSE", | ||
"README.md", | ||
"dist" | ||
], | ||
"dependencies": { | ||
"axios": "^1.1.0" | ||
}, | ||
"devDependencies": { | ||
"@openapitools/openapi-generator-cli": "2.5.2", | ||
"@types/node": "^18.8.3", | ||
"openapi-typescript-codegen": "^0.23.0", | ||
"typescript": "^4.9.5" | ||
}, | ||
"author": "casaos", | ||
"license": "Apache-2.0" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"compilerOptions": { | ||
"declaration": true, | ||
"lib": [ | ||
"es2017", | ||
"DOM" | ||
], | ||
"module": "commonjs", | ||
"target": "es6", | ||
"skipLibCheck": true, | ||
"sourceMap": false, | ||
"strict": true, | ||
"useUnknownInCatchVariables": false, | ||
"resolveJsonModule": true, | ||
"esModuleInterop": true, | ||
"outDir": "dist", | ||
"types": [ | ||
"node" | ||
], | ||
}, | ||
"exclude": [ | ||
"node_modules" | ||
], | ||
"main": "generate/index" | ||
} |