-
-
Notifications
You must be signed in to change notification settings - Fork 3
42 lines (35 loc) · 972 Bytes
/
cd.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
name: Continuous Deployment
on:
push:
tags:
- "v*.*.*"
jobs:
create-release:
name: Create release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Generate a changelog
uses: orhun/git-cliff-action@v3
with:
args: --latest --github-repo ${{ github.repository }}
env:
OUTPUT: CHANGES.md
- name: Create release
run: gh release create "${{ github.ref_name }}" -F CHANGES.md
env:
GH_TOKEN: ${{ secrets.RELEASE_TOKEN }}
publish-crates-io:
name: Publish on crates.io
needs: create-release
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v4
- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
- name: Publish
run: cargo publish --locked --token ${{ secrets.CARGO_TOKEN }}