Skip to content

Commit dd91ffe

Browse files
authored
Update npm-publish.yml
1 parent 1959c83 commit dd91ffe

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

.github/workflows/npm-publish.yml

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
node-version: 16
2020
- run: npm ci
2121

22-
update-version:
22+
update-version-and-publish:
2323
needs: build
2424
runs-on: ubuntu-latest
2525
steps:
@@ -28,7 +28,6 @@ jobs:
2828
run: |
2929
TAG_NAME=$(echo ${{github.ref_name}})
3030
jq --arg tag "$TAG_NAME" '.version = $tag' package.json > tmp.$$.json && mv tmp.$$.json package.json
31-
3231
- name: Commit and push changes
3332
run: |
3433
TAG_NAME=$(echo ${{github.ref_name}})
@@ -40,18 +39,12 @@ jobs:
4039
git push --force origin $TAG_NAME
4140
env:
4241
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43-
44-
publish-npm:
45-
needs: update-version
46-
runs-on: ubuntu-latest
47-
if: startsWith(github.ref, 'refs/tags/')
48-
steps:
49-
- uses: actions/checkout@v4
5042
- uses: actions/setup-node@v3
5143
with:
5244
node-version: 16
5345
registry-url: https://registry.npmjs.org/
5446
- run: npm ci
5547
- run: npm publish
5648
env:
57-
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
49+
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
50+

0 commit comments

Comments
 (0)