-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (41 loc) · 1.15 KB
/
release.yaml
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
name: release
on:
push:
tags:
- "*.*.*"
jobs:
publish:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
./target
key: ${{ runner.os }}-redsync-${{ hashFiles('Cargo.toml') }}
restore-keys: ${{ runner.os }}-redsync-
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
with:
command: publish
args: --token ${{ secrets.CRATESIO_TOKEN }}
- name: Get tag
id: tag
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
- uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.tag.outputs.VERSION }}
release_name: v${{ steps.tag.outputs.VERSION }}
body: |
Add the following line to your Cargo.toml file:
```toml
redsync = "${{ steps.tag.outputs.VERSION }}"
```