-
Notifications
You must be signed in to change notification settings - Fork 1
60 lines (48 loc) · 1.39 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
on:
release:
types: [created]
name: Publish to crate
jobs:
publish:
name: Publish to cargo
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: yarn
registry-url: https://registry.npmjs.org/
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- uses: Swatinem/rust-cache@v2
- run: cargo test
- run: cargo run --bin cr calcit/editor/compact.cirru --once
- run: cargo run --bin cr calcit/test.cirru --once
- name: "try js"
run: >
yarn
&& yarn tsc
&& cargo run --bin cr calcit/test.cirru --once js
&& ln -s ../../ node_modules/@calcit/procs
&& cp -v scripts/main.mjs js-out/
&& node js-out/main.mjs
- run: cargo build --release
- name: Release
uses: softprops/action-gh-release@v1
with:
files: |
target/release/cr
target/release/bundle_calcit
target/release/caps
- uses: katyo/publish-crates@v1
with:
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}
- name: "generate procs.mjs"
run: yarn && yarn tsc
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}