-
-
Notifications
You must be signed in to change notification settings - Fork 8
40 lines (31 loc) · 968 Bytes
/
rust-release.yml
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
on:
push:
# Pattern matched against refs/tags
tags:
- '*' # Push events to every tag not containing /
workflow_dispatch:
name: Rust Release
jobs:
publish:
name: Publish
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
components: clippy, rustfmt
targets: thumbv7em-none-eabihf
- name: Build
run: cargo build --all-targets --verbose
- name: Format with Fmt
run: cargo fmt --all -- --check --color always
- name: Lint with Clippy
run: cargo clippy --all-targets --all-features --workspace -- -D warnings
- name: Run Tests
run: cargo test --verbose
- run: cargo publish --token ${CRATES_TOKEN}
env:
CRATES_TOKEN: ${{ secrets.CRATES_TOKEN }}