-
Notifications
You must be signed in to change notification settings - Fork 1
38 lines (34 loc) · 984 Bytes
/
publish.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
name: Publish
on:
push:
paths:
- '.github/workflows/publish.yml'
- 'Cargo.toml'
- 'src/**/*'
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true
jobs:
publish:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/[email protected]
- name: Cargo publish
uses: actions-rs/cargo@v1
with:
command: publish
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_TOKEN }}
# If this was successful, also make a "release"
- name: Create release
uses: softprops/action-gh-release@v2
if: github.event_name != 'schedule'
with:
token: ${{ secrets.GITHUB_TOKEN }}
# Release name is the tag name
name: ${{ github.ref_name }}
draft: false
generate_release_notes: true
prerelease: false