-
Notifications
You must be signed in to change notification settings - Fork 1
46 lines (41 loc) · 1.09 KB
/
nblast-rs.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
on: [push, pull_request]
name: "NBLAST rust crate"
defaults:
run:
shell: bash
working-directory: nblast-rs
jobs:
lint:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v1
- run: cargo clippy --all-features
- run: cargo fmt -- --check
test:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- uses: Swatinem/rust-cache@v1
- run: cargo test --all-features
deploy:
runs-on: ubuntu-18.04
needs: [lint, test]
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/rs-v')
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- uses: Swatinem/rust-cache@v1
- run: cargo login ${CRATES_IO_TOKEN}
env:
CRATES_IO_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}
- run: cargo publish