-
-
Notifications
You must be signed in to change notification settings - Fork 3
55 lines (44 loc) · 1.28 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
54
55
name: CD
on:
push:
tags:
- "v*.*.*"
jobs:
publish-github:
name: Publish on GitHub
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set the release version
run: echo "RELEASE_VERSION=${GITHUB_REF:11}" >> $GITHUB_ENV
- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
- name: Cache Cargo dependencies
uses: Swatinem/rust-cache@v2
- name: Check
run: cargo check --locked
- name: Generate a changelog
uses: orhun/git-cliff-action@v4
id: git-cliff
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_PLZ_TOKEN }}
publish-crates-io:
name: Publish on crates.io
needs: publish-github
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_REGISTRY_TOKEN }}