-
Notifications
You must be signed in to change notification settings - Fork 106
135 lines (111 loc) · 3.09 KB
/
build.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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
on:
workflow_call:
inputs:
tag:
required: true
type: string
upload_url:
required: true
type: string
release_ref:
required: true
type: string
overwrite:
required: true
type: boolean
release_name:
required: false
type: string
release_body:
required: false
type: string
jobs:
windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v1
with:
submodules: true
- uses: Swatinem/rust-cache@v2
- name: Build release binary
run: cargo build --verbose --locked --release
- name: Create Release Archive
shell: bash
run: |
mkdir staging
cp "target/release/wally.exe" staging/
cd staging
7z a ../release.zip *
- name: Upload Archive to Release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ inputs.tag }}
file: release.zip
asset_name: wally-${{ inputs.release_ref }}-win64.zip
overwrite: ${{ inputs.overwrite }}
release_name: ${{ inputs.release_name }}
body: ${{ inputs.release_body }}
prerelease: true
macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v1
with:
submodules: true
- name: Install Rust
run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
- uses: Swatinem/rust-cache@v2
- name: Build release binary
run: |
source $HOME/.cargo/env
cargo build --verbose --locked --release
env:
OPENSSL_STATIC: 1
- name: Create Release Archive
shell: bash
run: |
mkdir staging
cp "target/release/wally" staging/
cd staging
zip ../release.zip *
- name: Upload Archive to Release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ inputs.tag }}
file: release.zip
asset_name: wally-${{ inputs.release_ref }}-macos.zip
overwrite: ${{ inputs.overwrite }}
release_name: ${{ inputs.release_name }}
body: ${{ inputs.release_body }}
prerelease: true
linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
with:
submodules: true
- uses: Swatinem/rust-cache@v2
- name: Build
run: cargo build --locked --verbose --release
env:
OPENSSL_STATIC: 1
- name: Create Release Archive
shell: bash
run: |
mkdir staging
cp "target/release/wally" staging/
cd staging
zip ../release.zip *
- name: Upload Archive to Release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ inputs.tag }}
file: release.zip
asset_name: wally-${{ inputs.release_ref }}-linux.zip
overwrite: ${{ inputs.overwrite }}
release_name: ${{ inputs.release_name }}
body: ${{ inputs.release_body }}
prerelease: true