@@ -10,40 +10,18 @@ jobs:
1010 steps :
1111 - name : Check out code
1212 uses : actions/checkout@v3
13- # with:
14- # ref: ${{ github.head_ref }}
15- # fetch-depth: 0
16-
17- - name : Configure Git
18- run : |
19- git config --local user.email "github-actions[bot]@users.noreply.github.com"
20- git config --local user.name "github-actions[bot]"
21-
22- - name : Update package version and create Git tag
23- run : |
24- VERSION=$(echo ${{ github.event.release.tag_name }} | sed 's/^v//')
25- npm version $VERSION --no-git-tag-version
26- git add package.json
27- git commit -m "chore(release): bump version to $VERSION"
28- git tag -a $VERSION -m "chore(release): tag version $VERSION"
29-
30- - name : Push Git tag
31- run : git push origin ${{ github.event.release.tag_name }}
32- env :
33- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
34-
35- # - name: Push changes
36- # uses: ad-m/github-push-action@master
37- # with:
38- # tags: true
39- # branch: ${{ github.ref }}
4013
4114 - name : Setup Node.js
4215 uses : actions/setup-node@v3
4316 with :
4417 node-version : ' 20'
4518 registry-url : ' https://registry.npmjs.org/'
4619
20+ - name : Update package version
21+ run : |
22+ VERSION=$(echo ${{ github.event.release.tag_name }} | sed 's/^v//')
23+ npm version $VERSION --no-git-tag-version
24+
4725 - name : Install dependencies
4826 run : npm install
4927
5331 - name : Run tests and collect coverage
5432 run : npm run test:cov
5533
56- # - name: Upload coverage reports to Codecov
57- # uses: codecov/codecov-action@v4.0.1
58- # with:
59- # token: ${{ secrets.CODECOV_TOKEN }}
60- # slug: wokim/nestjs-ddtrace
61- # file: ./coverage/lcov.info
62- # flags: unittests # Optional
63-
6434 - name : Publish to npm
65- # run: npm publish
66- # env:
67- # NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
6835 uses : JS-DevTools/npm-publish@v1
6936 with :
7037 token : ${{secrets.NPM_TOKEN}}
0 commit comments