-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTaskfile.yml
61 lines (51 loc) · 1.54 KB
/
Taskfile.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
version: '3'
vars:
VERSION:
# sh: cargo read-manifest | jq -r .version
sh: cat ./VERSION
tasks:
build:
cmds:
- echo "Building..."
- wasm-pack build --target bundler --out-name bundle --out-dir ./builds/bundle/pkg
build-node:
cmds:
- echo "Building..."
- wasm-pack build --target nodejs --out-name node --out-dir ./builds/node/pkg
build-all:
cmds:
- echo "Building..."
- wasm-pack build --target bundler --out-name bundle --out-dir ./builds/bundle/pkg
- wasm-pack build --target web --out-name web --out-dir ./builds/web/pkg
- wasm-pack build --target nodejs --out-name node --out-dir ./builds/node/pkg
echo-test:
cmds:
- echo "Testing..."
- node ./benchmarks/jsontrek.mjs
publish:
dir: ./builds/bundle/pkg
cmds:
- echo "Publishing..."
- npm publish
patch:
vars:
VER:
sh: bump -b patch
cmds:
- echo "Patching..."
- git branch --show-current | grep ^releases || { echo "Not on releases branch"; exit 1; }
- cargo bump patch
- git commit -m "Prepare patch v{{.VER}} for release" VERSION
tag:
cmds:
- echo "Tagging..."
- git branch --show-current | grep ^releases || { echo "Not on releases branch"; exit 1; }
- git diff --cached --quiet --exit-code
- git tag -a v{{.VERSION}} -m "Release v{{.VERSION}}" && echo "Tagged v{{.VERSION}}"
- git push origin v{{.VERSION}}
release:
cmds:
- echo "Releasing..."
- task patch
- task build
- task publish