-
Notifications
You must be signed in to change notification settings - Fork 127
62 lines (60 loc) · 2.56 KB
/
release-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
52
53
54
55
56
57
58
59
60
61
62
name: Release Binary
on:
release:
types:
- created
jobs:
uploadAssets:
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v1
- name: build binary by using docker
run: |
sed "s/make build/make build-all-binary/g" Dockerfile | tee Dockerfile.all-binary
docker build -t build:all-binary -f Dockerfile.all-binary --build-arg EVM_CHAIN_ID=6688 .
docker run -itd --name iris-all-binary build:all-binary tail -f /dev/null
mkdir -p build/
- name: tar linux amd64 binary
run: |
docker cp iris-all-binary:/usr/local/bin/iris-linux-amd64 build/
tar -czvf build/iris-linux-amd64-${GITHUB_REF_NAME}.tar.gz build/iris-linux-amd64
- name: tar linux arm64 binary
run: |
docker cp iris-all-binary:/usr/local/bin/iris-linux-arm64 build/
tar -czvf build/iris-linux-arm64-${GITHUB_REF_NAME}.tar.gz build/iris-linux-arm64
- name: get windows amd64 binary
run: |
docker cp iris-all-binary:/usr/local/bin/iris-windows-amd64.exe build/
mv build/iris-windows-amd64.exe build/iris-windows-amd64-${GITHUB_REF_NAME}.exe
ls build/
- name: Upload Linux AMD64 Release Asset
id: upload-linux-amd64
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: build/iris-linux-amd64-${{ github.ref_name }}.tar.gz
asset_name: iris-linux-amd64-${{ github.ref_name }}.tar.gz
asset_content_type: application/gzip
- name: Upload Linux ARM64 Release Asset
id: upload-linux-arm64
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: build/iris-linux-arm64-${{ github.ref_name }}.tar.gz
asset_name: iris-linux-arm64-${{ github.ref_name }}.tar.gz
asset_content_type: application/gzip
- name: Upload Windows AMD64 Release Asset
id: upload-windows-amd64
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: build/iris-windows-amd64-${{ github.ref_name }}.exe
asset_name: iris-windows-amd64-${{ github.ref_name }}.exe
asset_content_type: application/octet-stream