-
Notifications
You must be signed in to change notification settings - Fork 4
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
96bcf2b
commit 7a6fac9
Showing
1 changed file
with
36 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,36 @@ | ||
name: publish npm | ||
|
||
on: | ||
push: | ||
tags: | ||
- v*.*.* | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
publish-npm: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
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: | | ||
sudo 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: bash generate-npm.sh | ||
env: | ||
NODE_AUTH_TOKEN: ${{secrets.npm_token}} |