Skip to content

Commit

Permalink
Update publish_npm.yml (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
orca-zhang authored Jun 28, 2024
1 parent 96a0eda commit bc350b3
Showing 1 changed file with 4 additions and 26 deletions.
30 changes: 4 additions & 26 deletions .github/workflows/publish_npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,7 @@ 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: npm i
- run: npm run start
- run: npm publish --access
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
call-workflow-passing-data:
uses: IceWhaleTech/github/.github/workflows/npm_release.yml@main
secrets:
NPM_TOKEN_PRIVATE: ${{ secrets.NPM_TOKEN }}

0 comments on commit bc350b3

Please sign in to comment.