File tree Expand file tree Collapse file tree 3 files changed +75
-2
lines changed
Expand file tree Collapse file tree 3 files changed +75
-2
lines changed Original file line number Diff line number Diff line change 1+ name : CI
2+
3+ on :
4+ push :
5+ tags :
6+ - ' v*.*.*'
7+ branches :
8+ - main
9+ pull_request :
10+
11+ env :
12+ CARGO_TERM_COLOR : always
13+
14+ jobs :
15+ build :
16+
17+ runs-on : ubuntu-latest
18+ steps :
19+ - uses : actions/checkout@v3
20+ - uses : actions/cache@v3
21+ with :
22+ path : |
23+ ~/.cargo/bin/
24+ ~/.cargo/registry/index/
25+ ~/.cargo/registry/cache/
26+ ~/.cargo/git/db/
27+ target/
28+ key : ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-is
29+ - name : Setup Rust
30+ uses : actions-rs/toolchain@v1
31+ with :
32+ toolchain : stable
33+ override : true
34+ - name : Check formatting
35+ run : cargo fmt -- --check
36+ - name : Clippy
37+ run : cargo clippy -- -Dwarnings
38+ - name : Tests
39+ run : cargo test --all-features
40+
41+ publish :
42+ needs : [ build ]
43+ if : " startsWith(github.ref, 'refs/tags/v')"
44+ runs-on : ubuntu-latest
45+ steps :
46+ - name : Checkout
47+ uses : actions/checkout@v3
48+ with :
49+ submodules : true
50+ - uses : actions/cache@v3
51+ with :
52+ path : |
53+ ~/.cargo/bin/
54+ ~/.cargo/registry/index/
55+ ~/.cargo/registry/cache/
56+ ~/.cargo/git/db/
57+ target/
58+ key : ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-is
59+
60+ - name : Setup Rust
61+ uses : actions-rs/toolchain@v1
62+ with :
63+ toolchain : stable
64+ override : true
65+ - id : get_version
66+ uses : battila7/get-version-action@v2
67+ - name : Publish crate
68+ env :
69+ CARGO_REGISTRY_TOKEN : ${{ secrets.CARGO_REGISTRY_TOKEN }}
70+ run : |
71+ export VERSION="${{ steps.get_version.outputs.version-without-v }}"
72+ sed -i "s/0.0.0/$VERSION/g" Cargo.toml
73+ cargo publish --all-features --allow-dirty
Original file line number Diff line number Diff line change 11[package ]
22name = " golem-scalajs-wit-bindgen"
33description = " Golem Cloud CLI tool for generating Scala.js bindings from a WIT file"
4- version = " 0.1 .0"
4+ version = " 0.0 .0"
55edition = " 2021"
66license = " Apache-2.0"
77homepage = " https://www.golem.cloud/"
You can’t perform that action at this time.
0 commit comments