-
Notifications
You must be signed in to change notification settings - Fork 3
59 lines (50 loc) · 1.46 KB
/
publish-client-js.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Publish Client JS
on:
push:
branches:
- main
paths:
- 'packages/hyperstructure-client-js/**'
jobs:
check:
name: Check package.json version
runs-on: ubuntu-latest
outputs:
changed: ${{ steps.check.outputs.changed }}
steps:
- name: Checkout repo
uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18.x'
registry-url: 'https://registry.npmjs.org'
- name: Check version
id: check
uses: EndBug/version-check@v2
with:
file-name: ./packages/hyperstructure-client-js/package.json
file-url: https://unpkg.com/@pooltogether/hyperstructure-client-js@latest/package.json
static-checking: localIsNew
publish:
name: Publish new package version to NPM
runs-on: ubuntu-latest
needs: check
if: needs.check.outputs.changed == 'true'
steps:
- name: Checkout repo
uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18.x'
registry-url: 'https://registry.npmjs.org'
- uses: pnpm/action-setup@v2
with:
version: 7.15.0
- name: Install
run: pnpm i
working-directory: ./packages/hyperstructure-client-js
- name: Publish
run: pnpm publish
working-directory: ./packages/hyperstructure-client-js
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_KEY }}