fix: use UUIDv4 for message id to avoid integer overflow
[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
726457b4 23 corepack prepare pnpm@latest --activate
186b35b6 24 pnpm install
e0d233a8 25
4b85ba43
JB
26 - name: Tests & Coverage
27 run: |
186b35b6
JB
28 pnpm run test
29 pnpm run coverage
11caf266 30
73db65c0 31 - name: Lint
186b35b6 32 run: pnpm run lint
73db65c0 33
4b85ba43 34 - name: Production Build
186b35b6 35 run: pnpm run build:prod
4b85ba43 36
186b35b6 37 publish:
90bd5e47 38 needs: build
39 runs-on: ubuntu-latest
40
41 steps:
42 - name: Checkout
b8497a0a 43 uses: actions/checkout@v3
90bd5e47 44
515e5da7 45 - name: Setup Node
b8497a0a 46 uses: actions/setup-node@v3
11caf266 47 with:
02234757 48 node-version: '18.x'
11caf266 49 registry-url: https://registry.npmjs.org/
515e5da7 50
5716dd56 51 - name: Read package.json version
5716dd56 52 id: package-version
8fddc4b9 53 uses: jaywcjlove/github-action-package@main
5716dd56 54
515e5da7 55 - name: Install
186b35b6 56 run: pnpm install
90bd5e47 57
5716dd56
S
58 - name: Publish Release
59 if: ${{ contains(steps.package-version.outputs.version, '-') == false }}
186b35b6 60 run: pnpm publish
11caf266 61 env:
74aeaae0 62 NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
5716dd56 63
17c90274
JB
64 - name: Publish Pre-Release
65 if: ${{ contains(steps.package-version.outputs.version, '-') == true }}
186b35b6 66 run: pnpm publish --tag next
5716dd56 67 env:
74aeaae0 68 NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
17c90274
JB
69
70 # - name: Publish Beta Release
71 # if: ${{ contains(steps.package-version.outputs.version, 'beta') == true }}
186b35b6 72 # run: pnpm publish --tag beta
17c90274
JB
73 # env:
74 # NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}