Skip to content

Commit bd5cd24

Browse files
author
Christopher Kolstad
committed
Added publish workflow
1 parent f9bd997 commit bd5cd24

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

.github/workflows/publish.yaml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Release
2+
on:
3+
push:
4+
tags:
5+
- 'v*'
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
env:
11+
CI: 1
12+
CARGO_INCREMENTAL: 0
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v3
16+
- name: Install Rust
17+
uses: actions-rs/toolchain@v1
18+
with:
19+
toolchain: 1.64.0-x86_64-unknown-linux-gnu
20+
profile: minimal
21+
override: true
22+
- name: Generate Cargo.lock
23+
uses: actions-rs/cargo@v1
24+
with: { command: generate-lockfile }
25+
- name: Cache Dependencies
26+
uses: Swatinem/rust-cache@v2
27+
- name: Test
28+
timeout-minutes: 10
29+
run: |
30+
cargo test
31+
- name: Publish
32+
run: |
33+
cargo publish
34+
env:
35+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
36+
- name: Clear the cargo caches
37+
run: |
38+
cargo install cargo-cache --version 0.8.2 --no-default-features --features ci-autoclean
39+
cargo-cache

0 commit comments

Comments
 (0)