File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Build
2+
3+ on :
4+ push :
5+ branches : [ "main" ]
6+ pull_request :
7+ branches : [ "main" ]
8+
9+
10+ env :
11+ CARGO_TERM_COLOR : always
12+
13+ jobs :
14+ build :
15+ runs-on : ubuntu-latest
16+ steps :
17+ - uses : actions/checkout@v4
18+ - name : Build
19+ run : cargo build --verbose
20+ - name : Run tests
21+ run : cargo test --verbose
Original file line number Diff line number Diff line change 1+ name : BuildAndPublish
2+
3+ on :
4+ push :
5+ tags :
6+ - ' *'
7+
8+ env :
9+ CARGO_TERM_COLOR : always
10+
11+ jobs :
12+ build :
13+ runs-on : ubuntu-latest
14+ steps :
15+ - uses : actions/checkout@v4
16+ - name : Build
17+ run : cargo build --verbose
18+ - name : Run tests
19+ run : cargo test --verbose
20+
21+ publish :
22+ needs : build
23+ runs-on : ubuntu-latest
24+ steps :
25+ - uses : actions/checkout@v4
26+ - name : Login into crates.io
27+ run : cargo login ${{ secrets.CRATES_IO }}
28+ - name : Build binaries in "release" mode
29+ run : cargo build -r
30+ - name : " Publish to crates.io"
31+ run : cargo publish # publishes your crate as a library that can be added as a dependency
You can’t perform that action at this time.
0 commit comments