Skip to content

Commit f6f7b68

Browse files
committed
Added binary build workflow
1 parent 0ef347b commit f6f7b68

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.github/workflows/binary-build.yml

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Binary build
2+
3+
on:
4+
push:
5+
branch:
6+
- 'main'
7+
- 'stable'
8+
9+
env:
10+
CARGO_TERM_COLOR: always
11+
12+
jobs:
13+
14+
cross-build:
15+
name: Publish binary builds
16+
runs-on: ubuntu-latest
17+
strategy:
18+
matrix:
19+
target: ["x86_64-unknown-linux-gnu", "i686-unknown-linux-gnu", "aarch64-unknown-linux-gnu", "armv7-unknown-linux-gnueabihf", "x86_64-pc-windows-gnu"]
20+
steps:
21+
- uses: actions/checkout@v2
22+
- name: Download renamer
23+
run: curl -sSf https://raw.githubusercontent.com/memflow/memflowup/master/target_rename.sh > target_rename.sh
24+
- name: Build artifacts
25+
uses: actions-rs/cargo@v1
26+
with:
27+
use-cross: true
28+
command: build
29+
args: --release --all-features --workspace --verbose --target ${{ matrix.target }}
30+
- name: Rename and collect artifacts
31+
id: artifacts
32+
run: echo "::set-output name=artifact::$(sh ./target_rename.sh "${{ matrix.target }}" | head -n 1)"
33+
- name: Upload build artifacts
34+
uses: softprops/action-gh-release@v1
35+
with:
36+
tag_name: bin-${{ github.ref_name }}
37+
files: |
38+
${{ steps.artifacts.outputs.artifact }}

0 commit comments

Comments
 (0)