From 10126f51410dc31df5a7e498178a232bb3fef8b5 Mon Sep 17 00:00:00 2001 From: Feilner Date: Thu, 28 Apr 2022 19:06:39 +0200 Subject: [PATCH] update publish --- .github/workflows/npm-publish.yml | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index c784801..2cd8f55 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -17,14 +17,17 @@ jobs: uses: actions/setup-node@v1 with: node-version: 12 - registry-url: https://registry.npmjs.org/ - - name: Publish + - name: Publish release if: "!contains(github.event.release.tag_name, 'beta')" - run: npm publish --access public - env: - NODE_AUTH_TOKEN: ${{secrets.npm_token}} - - name: Publish as beta - if: contains(github.event.release.tag_name, 'beta') - run: npm publish --tag beta --access public - env: - NODE_AUTH_TOKEN: ${{secrets.npm_token}} + uses: JS-DevTools/npm-publish@v1 + with: + token: ${{ secrets.NPM_TOKEN }} + tag: latest + access: public + - name: Publish beta + if: "contains(github.event.release.tag_name, 'beta')" + uses: JS-DevTools/npm-publish@v1 + with: + token: ${{ secrets.NPM_TOKEN }} + tag: beta + access: public