-
Notifications
You must be signed in to change notification settings - Fork 38
70 lines (55 loc) · 1.93 KB
/
publish.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
60
61
62
63
64
65
66
67
68
69
70
name: publish
env:
NPM_REGISTRY: 'https://registry.npmjs.org'
on:
push:
tags:
- v*
jobs:
publish-to-npm:
name: "Publish new version to NPM"
runs-on: ubuntu-latest
timeout-minutes: 5
env:
NODE_OPTIONS: "--trace-warnings"
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
steps:
- name: "Checkout this repo"
uses: actions/checkout@v3
- name: "Setup Node.js"
uses: actions/setup-node@v3
with:
node-version: "18.x"
- name: "Build core"
run: "npm ci && npm run build"
working-directory: ./packages/libsql-core
- name: "Publish core (pre-release)"
if: contains(github.ref, '-pre')
run: npm publish --tag next
working-directory: ./packages/libsql-core
- name: "Publish core (latest)"
if: "!contains(github.ref, '-pre')"
run: npm publish
working-directory: ./packages/libsql-core
- name: "Install npm dependencies (client)"
run: "npm ci"
working-directory: ./packages/libsql-client
- name: "Publish client (pre-release)"
if: contains(github.ref, '-pre')
run: npm publish --tag next
working-directory: ./packages/libsql-client
- name: "Publish client (latest)"
if: "!contains(github.ref, '-pre')"
run: npm publish
working-directory: ./packages/libsql-client
- name: "Install npm dependencies (client wasm)"
run: "npm ci"
working-directory: ./packages/libsql-client-wasm
- name: "Publish client-wasm (pre-release)"
if: contains(github.ref, '-pre')
run: npm publish --tag next
working-directory: ./packages/libsql-client-wasm
- name: "Publish client-wasm (latest)"
if: "!contains(github.ref, '-pre')"
run: npm publish
working-directory: ./packages/libsql-client-wasm