ci(release): update github action for npm package (#8384)
This commit is contained in:
9
.github/workflows/release-swagger-ui.yml
vendored
9
.github/workflows/release-swagger-ui.yml
vendored
@@ -15,15 +15,12 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
submodules: true
|
|
||||||
ref: next
|
ref: next
|
||||||
|
|
||||||
- name: Setup Node.js
|
- name: Setup Node.js
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: 16
|
node-version: 16
|
||||||
registry-url: https://npm.pkg.github.com/
|
|
||||||
scope: "@swagger-api"
|
|
||||||
|
|
||||||
- name: Determine the next release version
|
- name: Determine the next release version
|
||||||
uses: cycjimmy/semantic-release-action@v3
|
uses: cycjimmy/semantic-release-action@v3
|
||||||
@@ -35,7 +32,6 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.SWAGGER_BOT_GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.SWAGGER_BOT_GITHUB_TOKEN }}
|
||||||
NPM_TOKEN: ${{ secrets.SWAGGER_BOT_GITHUB_TOKEN }}
|
NPM_TOKEN: ${{ secrets.SWAGGER_BOT_GITHUB_TOKEN }}
|
||||||
NODE_AUTH_TOKEN: ${{ secrets.SWAGGER_BOT_GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Nothing to release
|
- name: Nothing to release
|
||||||
if: ${{ env.NEXT_RELEASE_VERSION == '' }}
|
if: ${{ env.NEXT_RELEASE_VERSION == '' }}
|
||||||
@@ -46,8 +42,6 @@ jobs:
|
|||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm ci
|
run: npm ci
|
||||||
env:
|
|
||||||
NODE_AUTH_TOKEN: ${{ secrets.SWAGGER_BOT_GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Semantic Release
|
- name: Semantic Release
|
||||||
id: semantic
|
id: semantic
|
||||||
@@ -58,8 +52,7 @@ jobs:
|
|||||||
@semantic-release/git
|
@semantic-release/git
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.SWAGGER_BOT_GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.SWAGGER_BOT_GITHUB_TOKEN }}
|
||||||
NPM_TOKEN: ${{ secrets.SWAGGER_BOT_GITHUB_TOKEN }}
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||||
NODE_AUTH_TOKEN: ${{ secrets.SWAGGER_BOT_GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Release failed
|
- name: Release failed
|
||||||
if: steps.semantic.outputs.new_release_published == 'false'
|
if: steps.semantic.outputs.new_release_published == 'false'
|
||||||
|
|||||||
Reference in New Issue
Block a user