@@ -17,18 +17,23 @@ jobs:
1717 - name : Checkout
1818 uses : actions/checkout@v3
1919
20+ - name : Setup Node.js
21+ uses : actions/setup-node@v3
22+ with :
23+ node-version : 18
24+
2025 - name : Analyze commits
2126 id : next_release_version
2227 run : |
2328
24- npm install --save-dev semantic-release > /dev/null
29+ npm install --save-dev semantic-release@18 > /dev/null
2530 sed -i "s#const {isCi, branch, prBranch, isPr} = context.envCi;#const {isCi, branch, prBranch, isPr} = {isCi: false, branch: '${{ github.event.pull_request.head.ref }}', prBranch: undefined, isPr: undefined};#" node_modules/semantic-release/index.js
26- echo ::set-output name= TAG:: $(npx semantic-release -b ${{ github.event.pull_request.head.ref }} -p '@semantic-release/commit-analyzer' --dry-run --no-ci | grep -oiP 'the next release version is *\K.*')
31+ echo " TAG= $(npx semantic-release -b ${{ github.event.pull_request.head.ref }} -p '@semantic-release/commit-analyzer' --dry-run --no-ci | grep -oiP 'the next release version is *\K.*')" >> $GITHUB_OUTPUT
2732 env :
2833 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
2934
3035 - name : Create comment if analyze commits fails
31- uses : peter-evans/create-or-update-comment@v1
36+ uses : peter-evans/create-or-update-comment@v2
3237 if : steps.next_release_version.outputs.TAG == ''
3338 with :
3439 issue-number : ${{ github.event.pull_request.number }}
3944
4045 - name : Cancel if analyze commits fails
4146 if : steps.next_release_version.outputs.TAG == ''
42- uses : actions/github-script@v3
47+ uses : actions/github-script@v6
4348 with :
4449 script : |
4550 core.setFailed("Commits message format don't use Angular Commit Message Conventions and it's necessary to generate the next tag")
@@ -50,10 +55,10 @@ jobs:
5055 if : github.event_name == 'push'
5156 steps :
5257 - name : Checkout
53- uses : actions/checkout@v2
58+ uses : actions/checkout@v3
5459
5560 - name : Semantic Release
5661 id : release
57- uses : cycjimmy/semantic-release-action@v2
62+ uses : cycjimmy/semantic-release-action@v3
5863 env :
5964 GITHUB_TOKEN : ${{ secrets.KINGKONG_GITHUB_TOKEN }}
0 commit comments