-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (50 loc) · 1.41 KB
/
release.yml
File metadata and controls
52 lines (50 loc) · 1.41 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
on:
release:
types: [created]
name: Release
jobs:
release:
name: release ${{ matrix.triple.target }}
runs-on: ${{ matrix.triple.os }}
strategy:
fail-fast: false
matrix:
triple:
- os: 'macOS-latest'
target: 'x86_64-apple-darwin'
cross: false
ext: ""
- os: 'ubuntu-latest'
target: 'x86_64-unknown-linux-gnu'
cross: false
ext: ""
- os: 'windows-latest'
target: 'x86_64-pc-windows-msvc'
cross: false
ext: ".exe"
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: ${{ matrix.triple.target }}
override: true
- name: build
uses: actions-rs/cargo@v1
with:
command: build
use-cross: ${{ matrix.triple.cross }}
args: >
--target ${{ matrix.triple.target }}
--release
- name: Compress binaries
uses: svenstaro/upx-action@v2
with:
file: "target/${{ matrix.triple.target }}/release/each${{ matrix.triple.ext }}"
- name: Upload
uses: actions/upload-artifact@v2
with:
name: "${{ matrix.triple.target }}"
path: "target/${{ matrix.triple.target }}/release/each${{ matrix.triple.ext }}"