forked from y-crdt/y-crdt
-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (56 loc) · 1.76 KB
/
release.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
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
name: Release packages
jobs:
release-crate:
name: release to crates.io
runs-on: ubuntu-latest
steps:
- name: checkout code
uses: actions/checkout@v2
- name: install rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: cargo publish yrs
run: cd ./yrs && cargo publish --all-features --token ${CRATES_TOKEN}
env:
CRATES_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
- name: cargo publish yffi
run: sleep 20 && cd ./yffi && cargo publish --token ${CRATES_TOKEN}
env:
CRATES_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
- name: cargo publish ywasm
run: sleep 20 && cd ./ywasm && cargo publish --token ${CRATES_TOKEN}
env:
CRATES_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
release-npm:
name: release to npmjs.org
runs-on: ubuntu-latest
steps:
- name: checkout code
uses: actions/checkout@v2
- name: install rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: install nodejs
uses: actions/setup-node@v3
with:
node-version: '16'
registry-url: 'https://registry.npmjs.org'
- name: install wasm-pack
uses: jetli/[email protected]
with:
version: 'latest'
- name: build wasm
run: wasm-pack build --release --target nodejs ./ywasm
- name: npm publish
run: cd ./ywasm/pkg && npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}