build(ci): remove unrecognized option
[poolifier.git] / .github / workflows / npmpublish.yml
CommitLineData
11caf266
APA
1name: Node.js Package
2
3on:
4 release:
5 types: [created]
6
7jobs:
8 build:
9 runs-on: ubuntu-latest
515e5da7 10
11caf266 11 steps:
515e5da7 12 - name: Checkout
b8497a0a 13 uses: actions/checkout@v3
515e5da7
APA
14
15 - name: Setup Node
b8497a0a 16 uses: actions/setup-node@v3
11caf266 17 with:
02234757 18 node-version: '18.x'
e0d233a8
JB
19
20 - name: Install
186b35b6
JB
21 run: |
22 corepack enable
23 pnpm install
e0d233a8 24
4b85ba43
JB
25 - name: Tests & Coverage
26 run: |
186b35b6
JB
27 pnpm run test
28 pnpm run coverage
11caf266 29
73db65c0 30 - name: Lint
186b35b6 31 run: pnpm run lint
73db65c0 32
4b85ba43 33 - name: Production Build
186b35b6 34 run: pnpm run build:prod
4b85ba43 35
186b35b6 36 publish:
90bd5e47 37 needs: build
38 runs-on: ubuntu-latest
39
40 steps:
41 - name: Checkout
b8497a0a 42 uses: actions/checkout@v3
90bd5e47 43
515e5da7 44 - name: Setup Node
b8497a0a 45 uses: actions/setup-node@v3
11caf266 46 with:
02234757 47 node-version: '18.x'
11caf266 48 registry-url: https://registry.npmjs.org/
515e5da7 49
5716dd56 50 - name: Read package.json version
5716dd56 51 id: package-version
8fddc4b9 52 uses: jaywcjlove/github-action-package@main
5716dd56 53
515e5da7 54 - name: Install
186b35b6 55 run: pnpm install
90bd5e47 56
5716dd56
S
57 - name: Publish Release
58 if: ${{ contains(steps.package-version.outputs.version, '-') == false }}
186b35b6 59 run: pnpm publish
11caf266 60 env:
74aeaae0 61 NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
5716dd56 62
17c90274
JB
63 - name: Publish Pre-Release
64 if: ${{ contains(steps.package-version.outputs.version, '-') == true }}
186b35b6 65 run: pnpm publish --tag next
5716dd56 66 env:
74aeaae0 67 NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
17c90274
JB
68
69 # - name: Publish Beta Release
70 # if: ${{ contains(steps.package-version.outputs.version, 'beta') == true }}
186b35b6 71 # run: pnpm publish --tag beta
17c90274
JB
72 # env:
73 # NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}