X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=.github%2Fworkflows%2Fnpmpublish.yml;h=a2f85f19362693f3ff290cf2266f1584703b35bf;hb=14916bf9ec9e7e60b1c03e9b6d876fc23990afad;hp=cfdc67a712004944e5f172a858a2599436271388;hpb=4b631f45e142c507baa2f0c438322b0eed910af5;p=poolifier.git diff --git a/.github/workflows/npmpublish.yml b/.github/workflows/npmpublish.yml index cfdc67a7..a2f85f19 100644 --- a/.github/workflows/npmpublish.yml +++ b/.github/workflows/npmpublish.yml @@ -15,22 +15,53 @@ jobs: - name: Setup Node uses: actions/setup-node@v2 with: - node-version: 12 - - run: npm ci - - run: npm run test:prod - - run: npm run lint - - run: npm run coverage + node-version: 14 + + - name: Install + run: npm ci + + - name: Production Build + run: npm run build:prod + + - name: Lint + run: npm run lint + + - name: Production Tests & Coverage + run: | + npm run test:prod + npm run coverage + env: + CI: true + + publish-npm: + needs: build + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v2 - name: Setup Node uses: actions/setup-node@v2 with: - node-version: 12 + node-version: 14 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 --production + run: npm ci + + - name: Publish Release + if: ${{ contains(steps.package-version.outputs.version, '-') == false }} + run: npm publish + env: + NODE_AUTH_TOKEN: ${{secrets.npm_token}} - - name: Publish - run: npm publish --tags + - name: Publish Beta + if: ${{ contains(steps.package-version.outputs.version, 'beta') }} + run: npm publish --tag beta env: NODE_AUTH_TOKEN: ${{secrets.npm_token}}