-
Notifications
You must be signed in to change notification settings - Fork 4
34 lines (31 loc) · 791 Bytes
/
publish.yml
File metadata and controls
34 lines (31 loc) · 791 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
name: Publish to crates.io
on:
push:
tags:
- v*
env:
CARGO_TERM_COLOR: always
permissions:
contents: write
discussions: write
jobs:
build-test-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: brndnmtthws/rust-action@v1
with:
toolchain: stable
- run: cargo build --all-features
- run: cargo test --all-features
- run: cargo login ${{ secrets.CRATES_IO_TOKEN }}
- run: cargo publish --all-features
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v2
if: github.ref_type == 'tag'
with:
draft: true
prerelease: false
discussion_category_name: General
generate_release_notes: true