-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (62 loc) · 1.74 KB
/
release.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
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
64
65
66
67
68
name: Release
on:
workflow_dispatch:
push:
tags:
- "v*"
jobs:
create_release:
name: Create Release
runs-on: ubuntu-latest
steps:
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
upload_assets:
name: Build and upload assets for ${{ matrix.os }}
needs: create_release
runs-on: ${{ matrix.os }}
strategy:
matrix:
name: [
linux,
windows,
macos
]
include:
- name: linux
os: ubuntu-latest
artifact_name: ./target/release/restorable
asset_name: restorable-linux
- name: windows
os: windows-latest
artifact_name: ./target/release/restorable.exe
asset_name: restorable-windows
- name: macos
os: macos-latest
artifact_name: ./target/release/restorable
asset_name: restorable-macos
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
- name: Build
run: cargo build --release --locked
- name: Upload binaries to release
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ needs.create_release.outputs.upload_url }}
asset_name: ${{ matrix.asset_name }}
asset_path: ${{ matrix.artifact_name }}
asset_content_type: application/octet-stream