-
Notifications
You must be signed in to change notification settings - Fork 12
45 lines (39 loc) · 893 Bytes
/
release.yml
File metadata and controls
45 lines (39 loc) · 893 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
38
39
40
41
42
43
44
45
name: Release
on:
push:
tags:
- '*'
permissions:
contents: write
jobs:
publish:
name: Publish
runs-on: ubuntu-latest
continue-on-error: true
if: github.ref_type == 'tag'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Publish
env:
TOKEN: ${{ secrets.CRATES_IO_TOKEN }}
run: |
cargo login $TOKEN
cargo publish --allow-dirty
release:
runs-on: ubuntu-latest
needs: ['publish']
steps:
- name: Create Release
id: create_release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: actions/create-release@v1
with:
draft: true
tag_name: ${{ github.ref_name }}
release_name: ${{ github.ref_name }}