1+ name : release
2+ on :
3+ push :
4+ branches :
5+ - master
6+ - feat/CI
7+ jobs :
8+ release :
9+ container : techknowlogick/xgo:latest
10+ runs-on : ubuntu-latest
11+ steps :
12+ - name : Check out code
13+ uses : actions/checkout@v2
14+ - name : Parse the new version number check against current release
15+ run : |
16+ echo ::set-env name=VER::$(cat ./VERSION | tr -d "[:space:]")
17+ chmod +x ./test/version.sh
18+ ./test/version.sh
19+ - name : Build the binary
20+ run : |
21+ make
22+ mv $(make target_name) ./artifacts/darknode_linux_amd64
23+ env GOOS=linux CGO_ENABLED=1 CC=aarch64-linux-gnu-gcc-6 CXX=aarch64-linux-gnu-g++-6 GOARCH=arm64 make
24+ mv $(make target_name) ./artifacts/darknode_linux_arm
25+ env GOOS=darwin CGO_ENABLED=1 CC=o64-clang CXX=o64-clang++ GOARCH=amd64 make
26+ mv $(make target_name) ./artifacts/darknode_darwin_amd64
27+ - name : Create Release
28+ id : create_release
29+ uses : actions/create-release@v1
30+ env :
31+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
32+ with :
33+ tag_name : ${{ env.VER }}
34+ release_name : ${{ env.VER }}
35+ draft : false
36+ prerelease : false
37+ - name : Upload binary for darwin/amd64
38+ uses : actions/upload-release-asset@v1
39+ env :
40+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
41+ with :
42+ upload_url : ${{ steps.create_release.outputs.upload_url }}
43+ asset_path : ./artifacts/darknode_darwin_amd64
44+ asset_name : darknode_darwin_amd64
45+ asset_content_type : application/octet-stream
46+ - name : Upload binary for linux/amd64
47+ uses : actions/upload-release-asset@v1
48+ env :
49+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
50+ with :
51+ upload_url : ${{ steps.create_release.outputs.upload_url }}
52+ asset_path : ./artifacts/darknode_linux_amd64
53+ asset_name : darknode_linux_amd64
54+ asset_content_type : application/octet-stream
55+ - name : Upload binary for linux/arm
56+ uses : actions/upload-release-asset@v1
57+ env :
58+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
59+ with :
60+ upload_url : ${{ steps.create_release.outputs.upload_url }}
61+ asset_path : ./artifacts/darknode_linux_arm
62+ asset_name : darknode_linux_arm
63+ asset_content_type : application/octet-stream
64+ - name : Upload install script
65+ uses : actions/upload-release-asset@v1
66+ env :
67+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
68+ with :
69+ upload_url : ${{ steps.create_release.outputs.upload_url }}
70+ asset_path : ./artifacts/install.sh
71+ asset_name : install.sh
72+ asset_content_type : text/x-sh; charset=utf-8
73+ - name : Upload update script
74+ uses : actions/upload-release-asset@v1
75+ env :
76+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
77+ with :
78+ upload_url : ${{ steps.create_release.outputs.upload_url }}
79+ asset_path : ./artifacts/update.sh
80+ asset_name : update.sh
81+ asset_content_type : text/x-sh; charset=utf-8
82+ - name : Verify the installation process
83+ run : |
84+ curl https://www.github.com/renproject/darknode-cli/releases/latest/download/install.sh -sSfL | sh
85+ export PATH=$PATH:$HOME/.darknode/bin
86+ darknode --version
0 commit comments