-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (30 loc) · 820 Bytes
/
release.yml
File metadata and controls
37 lines (30 loc) · 820 Bytes
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
name: Release
on:
push:
tags:
- 'v*'
env:
RUST_TOOLCHAIN: "1.93.0"
jobs:
release:
name: Publish to crates.io
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
- name: Validate tag matches crate versions
run: ./scripts/publish.sh --validate
- name: Publish to crates.io
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
run: ./scripts/publish.sh --publish
- name: Create GitHub release
env:
GH_TOKEN: ${{ github.token }}
run: |
TAG="${GITHUB_REF#refs/tags/}"
gh release create "$TAG" \
--title "$TAG" \
--generate-notes