-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (31 loc) · 871 Bytes
/
ci.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
name: CI
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
release:
types: [published]
env:
CARGO_TERM_COLOR: always
jobs:
check:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- run: nix flake check
- name: Setup Cargo
run: |
nix develop --command which cargo
nix develop --command cargo --version
- name: Build
run: nix develop --command cargo build --verbose
- name: Test
run: nix develop --command cargo test --verbose
- name: Publish
if: github.ref_type == 'tag'
run: nix develop --command cargo publish --verbose
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}