-
Notifications
You must be signed in to change notification settings - Fork 9
105 lines (104 loc) · 3.52 KB
/
publish.yaml
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
name: Publish
on:
workflow_dispatch:
release:
types: [published]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: install rustup
run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
- uses: Swatinem/rust-cache@v2
- name: install additional targets
run: rustup target add wasm32-wasi wasm32-unknown-unknown
- uses: actions/setup-node@v3
with:
node-version: 18
- run: npm install
- name: install wasm-opt
run: npm install wasm-opt -g
- name: install wasm-snip
run: cargo install wasm-snip
- name: build rust
run: ./build/build-rust.sh
env:
OPTIMIZE: "1"
- name: build node
run: ./build/build-node.sh
env:
OPTIMIZE: "1"
- name: publish to npm (esbuild-register)
uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}
package: "./packages/esbuild-register/package.json"
access: public
greater-version-only: true
- name: publish to npm (core)
uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}
package: "./packages/core/package.json"
access: public
greater-version-only: true
- name: publish to npm (loader-core)
uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}
package: "./packages/loader-core/package.json"
access: public
greater-version-only: true
- name: publish to npm (wasi-preview1)
uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}
package: "./packages/wasi-preview1/package.json"
access: public
greater-version-only: true
- name: publish to npm (cli)
uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}
package: "./packages/cli/package.json"
access: public
greater-version-only: true
- name: publish to npm (graphql-loader)
uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}
package: "./packages/graphql-loader/package.json"
access: public
greater-version-only: true
- name: publish to npm (rollup-plugin)
uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}
package: "./packages/rollup-plugin/package.json"
access: public
greater-version-only: true
- name: publish to npm (jest-transform)
uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}
package: "./packages/jest-transform/package.json"
access: public
greater-version-only: true
deploy-vercel:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Install Vercel CLI
run: npm install --global vercel@latest
- name: Pull Vercel Environment Information
run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}
- name: Build Project Artifacts
run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}
env:
VERCEL_URL: nitrogql.vercel.app
- name: Deploy Project Artifacts to Vercel
run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}