-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (66 loc) · 2.38 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
69
70
71
72
name: release
on:
push:
tags:
- v*
env:
CARGO_TERM_COLOR: always
jobs:
release:
name: Build and Release
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
artifact_name: /home/runner/work/servust/servust/target/x86_64-unknown-linux-gnu/release/servust
asset_name: servust-linux-amd64
target: x86_64-unknown-linux-gnu
install_dependencies: |
sudo apt-get update
sudo apt-get install -y libssl-dev
export OPENSSL_DIR=/usr
- os: macos-latest
artifact_name: /Users/runner/work/servust/servust/target/x86_64-apple-darwin/release/servust
asset_name: servust-apple-amd64
target: x86_64-apple-darwin
install_dependencies: |
brew install openssl
export OPENSSL_ROOT_DIR=/usr/local/opt/openssl
- os: windows-latest
artifact_name: D:\a\servust\servust\target\x86_64-pc-windows-msvc\release\servust.exe
asset_name: servust-windows-amd64.exe
target: x86_64-pc-windows-msvc
install_dependencies: |
choco install openssl
# - os: ubuntu-latest
# artifact_name: servust
# asset_name: servust-linux-armv7
# target: armv7-unknown-linux-gnueabihf
# install_dependencies: |
# sudo apt-get update
# sudo apt-get install -y libssl-dev
# export OPENSSL_DIR=/usr
# - os: macos-latest
# artifact_name: servust
# asset_name: servust-apple-arm64
# target: aarch64-apple-darwin
# install_dependencies: |
# brew install openssl
# export OPENSSL_ROOT_DIR=/usr/local/opt/openssl
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Build
run: cargo build --release --target ${{ matrix.target }} --locked
- uses: actions/upload-artifact@v3
with:
name: ${{ matrix.asset_name }}
path: ${{ matrix.artifact_name }}
- name: Upload binary to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ github.token }}
file: ${{ matrix.artifact_name }}
asset_name: ${{ matrix.asset_name }}
tag: ${{ github.ref }}