-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (45 loc) · 1.08 KB
/
ci.yaml
File metadata and controls
49 lines (45 loc) · 1.08 KB
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
47
48
49
on:
push:
branches:
- main
tags:
- v*
pull_request:
branches:
- main
workflow_dispatch:
name: Rust CI
jobs:
build-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Check fmt
run: cargo fmt --all --check
- name: Check clippy
run: cargo clippy -- -D warnings
- name: Check build
run: cargo build
- name: Check test
run: cargo test
changelog-check:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: Zomzog/changelog-checker@v1.3.0
with:
fileName: CHANGELOG.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
release:
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
needs: [build-check]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Publish to crates.io
uses: katyo/publish-crates@v1
with:
path: .
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}