We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1bebbdf commit d11d756Copy full SHA for d11d756
1 file changed
.github/workflows/rust.yml
@@ -0,0 +1,34 @@
1
+name: Rust
2
+
3
+on:
4
+ push:
5
+ branches: [ "main" ]
6
+ pull_request:
7
8
+ release:
9
+ types: [published]
10
11
+env:
12
+ CARGO_TERM_COLOR: always
13
14
+jobs:
15
+ build:
16
+ runs-on: ubuntu-latest
17
+ steps:
18
+ - uses: actions/checkout@v4
19
+ - name: Build
20
+ run: cargo build --verbose
21
+ - name: Run tests
22
+ run: cargo test --verbose
23
24
+ publish:
25
+ name: Publish to Crates.io
26
27
+ if: github.event_name == 'release' && github.event.action == 'published'
28
+ needs: build
29
30
31
+ - name: Install Rust toolchain
32
+ uses: dtolnay/rust-toolchain@stable
33
+ - name: Publish
34
+ run: cargo publish --token ${{ secrets.CRATES_IO_TOKEN }}
0 commit comments