forked from openethereum/openethereum
-
Notifications
You must be signed in to change notification settings - Fork 2
52 lines (40 loc) · 1.28 KB
/
build_binary.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
name: build binary
on:
release:
types: [published]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.47.0
target: x86_64-unknown-linux-gnu
- run: rustc --version
- uses: actions-rs/cargo@v1
with:
command: build
toolchain: 1.47.0
args: --release --features final --target x86_64-unknown-linux-gnu
- name: Get release
id: get_release
uses: bruceadams/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Archive
run: zip -j openethereum_linux.zip target/x86_64-unknown-linux-gnu/release/openethereum
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: ./openethereum_linux.zip
asset_name: openethereum_linux_${{ env.RELEASE_VERSION }}.zip
asset_content_type: application/zip