1- # Do not modify this file.
2- # Github Actions only recognizes `workflow_run` and `workflow_dispatch`
3- # events that are located in the default branch
4-
51name : Release SwaggerEditor@next
62on :
73 workflow_dispatch :
@@ -20,12 +16,14 @@ jobs:
2016 persist-credentials : false
2117 submodules : true
2218 ref : next
19+
2320 - name : Setup Node.js
2421 uses : actions/setup-node@v3
2522 with :
2623 node-version : 16.16
2724 registry-url : https://npm.pkg.github.com/
2825 scope : " @swagger-api"
26+
2927 - name : Install dependencies
3028 run : npm ci
3129 env :
4038 npm run build:bundle:umd
4139 - name : Semantic Release
4240 id : semantic
43- uses : cycjimmy/semantic-release-action@v2
41+ uses : cycjimmy/semantic-release-action@v3
4442 with :
4543 dry_run : false
4644 extra_plugins : |
@@ -49,10 +47,17 @@ jobs:
4947 GITHUB_TOKEN : ${{ secrets.SWAGGER_BOT_GITHUB_TOKEN }}
5048 NPM_TOKEN : ${{ secrets.SWAGGER_BOT_GITHUB_TOKEN }}
5149 NODE_AUTH_TOKEN : ${{ secrets.SWAGGER_BOT_GITHUB_TOKEN }}
50+
5251 - name : Release published
5352 if : steps.semantic.outputs.new_release_published == 'true'
5453 run : |
5554 echo ${{ steps.semantic.outputs.new_release_version }}
5655 echo ${{ steps.semantic.outputs.new_release_major_version }}
5756 echo ${{ steps.semantic.outputs.new_release_minor_version }}
5857 echo ${{ steps.semantic.outputs.new_release_patch_version }}
58+ - name : Release failed
59+ if : steps.semantic.outputs.new_release_published == 'false'
60+ uses : actions/github-script@v6
61+ with :
62+ script : |
63+ core.setFailed('Release failed')
0 commit comments