-
Notifications
You must be signed in to change notification settings - Fork 4
53 lines (43 loc) · 1.09 KB
/
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
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Release
# Do this on every push with a version tag
on:
push:
tags:
- "v*"
env:
CARGO_TERM_COLOR: always
jobs:
publish-crate:
name: Publish to crates.io
runs-on: ubuntu-22.04
steps:
- name: Checkout sources
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: rustfmt, clippy
- name: Install Cargo Make
uses: davidB/rust-cargo-make@v1
- name: Install Birli Dependencies
run: |
cargo make install_deps
- name: Check semver
uses: obi1kenobi/cargo-semver-checks-action@v1
- run: cargo package
- uses: taiki-e/create-gh-release-action@v1
with:
changelog: RELEASES.md
title: $version
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Cargo publish
run: |
cargo publish --token ${CARGO_REGISTRY_TOKEN}
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}