-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (59 loc) · 1.42 KB
/
release.yml
File metadata and controls
63 lines (59 loc) · 1.42 KB
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
on:
release:
types:
- released
name: Release
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
- uses: actions-rs/cargo@v1
with:
command: test
build:
name: Build
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
- uses: actions-rs/cargo@v1
with:
command: build
args: --release
- name: Change Binary Permission
run: chmod +x target/release/pct
- name: Archive Binary as an Artifact
uses: actions/upload-artifact@v2
with:
name: binary
path: target/release/pct
- name: Upload as a Release Assets
uses: softprops/action-gh-release@v1
with:
files: |
target/release/pct
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
crate:
name: Crate
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- uses: katyo/publish-crates@v1
with:
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}