@@ -26,13 +26,13 @@ jobs:
2626 NODE_VERSION : 22
2727 steps :
2828 - name : Сheckout repo
29- uses : actions/checkout@v4
29+ uses : actions/checkout@v6
3030 - name : Use Node.js ${{ env.NODE_VERSION }}
31- uses : actions/setup-node@v4
31+ uses : actions/setup-node@v6
3232 with :
3333 node-version : ${{ env.NODE_VERSION }}
3434 - name : Cache node modules
35- uses : actions/cache@v4
35+ uses : actions/cache@v5
3636 env :
3737 cache-name : cache-node-modules
3838 with :
@@ -54,22 +54,25 @@ jobs:
5454 else
5555 RELEASE_VERSION="${GITHUB_REF#refs/*/}"
5656 fi
57- echo "RELEASE_VERSION=${RELEASE_VERSION}" >> $GITHUB_ENV
57+ echo "RELEASE_VERSION=${RELEASE_VERSION#v }" >> $GITHUB_ENV
5858 - name : Create Release
5959 id : create_release
60- uses : actions/create-release@v1
61- env :
62- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
60+ uses : softprops/action-gh-release@v2
6361 with :
64- tag_name : ${{ env.RELEASE_VERSION }}
65- release_name : Release ${{ env.RELEASE_VERSION }}
66- body : |
67- see [CHANGELOG.md](https://github.com/siarheidudko/firebase-admin-cli/blob/main/CHANGELOG.md)
62+ tag_name : v${{ env.RELEASE_VERSION }}
63+ name : v${{ env.RELEASE_VERSION }}
64+ body_path : ${{ github.workspace }}/README.md
65+ repository : siarheidudko/firebase-admin-cli
66+ token : ${{ secrets.GITHUB_TOKEN }}
6867 draft : false
69- prerelease : false
68+ prerelease : ${{ !!endsWith(env.RELEASE_VERSION, '-beta') }}
7069 - name : Set registry npm packages
71- uses : actions/setup-node@v4
70+ if : ${{ !endsWith(env.RELEASE_VERSION, '-beta') }}
71+ uses : actions/setup-node@v6
7272 with :
7373 registry-url : " https://registry.npmjs.org"
74+ - name : Update npm to latest version
75+ run : npm install -g npm@latest
7476 - name : Publish package to NPM
77+ if : ${{ !endsWith(env.RELEASE_VERSION, '-beta') }}
7578 run : npm publish
0 commit comments