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
name: release
on:
push:
tags:
- "v*"
permissions:
contents: write
defaults:
run:
shell: bash
env:
CARGO_INCREMENTAL: 0
RUSTFLAGS: -Dwarnings
jobs:
test:
uses: ./.github/workflows/ci.yml
with:
release: true
publish:
runs-on: ubuntu-latest
needs: test
steps:
# Check out with full history to generate release notes.
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up toolchain
run: rustup show
- name: Release
run: gh release create ${{ github.ref_name }} --generate-notes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish
run: cargo publish
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}