X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=.github%2Fworkflows%2Fnpmpublish.yml;h=cc9523aba15515b50ce59f85a170256236a24aa4;hb=d94bee6fb7e3c48b2490cc4fdd1fe2c205c33f2a;hp=048d952e4e117319fde4b5b6fb183ee4c3c7973e;hpb=e0d233a8e0c7e22275b29c36367a3b6cbc2e39d4;p=poolifier.git diff --git a/.github/workflows/npmpublish.yml b/.github/workflows/npmpublish.yml index 048d952e..cc9523ab 100644 --- a/.github/workflows/npmpublish.yml +++ b/.github/workflows/npmpublish.yml @@ -10,12 +10,12 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Setup Node - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: - node-version: 12 + node-version: '16.x' - name: Install run: npm ci @@ -39,18 +39,29 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Setup Node - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: - node-version: 12 + node-version: '16.x' registry-url: https://registry.npmjs.org/ + - name: Read package.json version + uses: tyankatsu0105/read-package-version-actions@v1 + id: package-version + - name: Install run: npm ci - - name: Publish + - name: Publish Release + if: ${{ contains(steps.package-version.outputs.version, '-') == false }} run: npm publish env: - NODE_AUTH_TOKEN: ${{secrets.npm_token}} + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + + - name: Publish Beta + if: ${{ contains(steps.package-version.outputs.version, 'beta') }} + run: npm publish --tag beta + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}