File tree Expand file tree Collapse file tree 4 files changed +64
-1
lines changed
Expand file tree Collapse file tree 4 files changed +64
-1
lines changed Original file line number Diff line number Diff line change 1+ name : Release
2+
3+ on :
4+ push :
5+ tags :
6+ - ' v*.*.*'
7+
8+ jobs :
9+ release :
10+ name : Build Release on Linux and Macos
11+ runs-on : ${{matrix.os}}
12+ strategy :
13+ matrix :
14+ os : [macos-latest, ubuntu-latest]
15+ steps :
16+ - name : Set up Go
17+ uses : actions/setup-go@v2
18+ with :
19+ go-version : 1.13
20+
21+ - name : Check out code
22+ uses : actions/checkout@v2
23+
24+ - name : Build Binary
25+ run : make release-binary
26+
27+ - name : Release Binary
28+ uses : softprops/action-gh-release@v1
29+ with :
30+ files : bin/**.tar.gz
31+ env :
32+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change 22SHELL := /bin/bash
33CURRENT_PATH = $(shell pwd)
44APP_NAME = pier
5- APP_VERSION = 1.5 .0
5+ APP_VERSION = 1.6 .0
66
77# build with verison infos
88VERSION_DIR = github.com/meshplus/${APP_NAME}
@@ -86,6 +86,10 @@ docker-build: packr
8686build-linux :
8787 cd scripts && bash cross_compile.sh linux-amd64 ${CURRENT_PATH}
8888
89+ # # make release: Build release before push
90+ release-binary :
91+ @cd scripts && bash release_binary.sh ' ${APP_VERSION}'
92+
8993# # make linter: Run golanci-lint
9094linter :
9195 golangci-lint run
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ set -e
4+ source x.sh
5+
6+ CURRENT_PATH=$( pwd)
7+ PROJECT_PATH=$( dirname " ${CURRENT_PATH} " )
8+ RELEASE_PATH=${PROJECT_PATH} /bin
9+ APP_VERSION=${1:- ' 1.6.0' }
10+
11+ print_blue " ===> 1. Install packr"
12+ if ! type packr > /dev/null 2>&1 ; then
13+ go get -u github.com/gobuffalo/packr/packr
14+ fi
15+
16+ print_blue " ===> 2. build pier"
17+ cd " ${PROJECT_PATH} " && make build
18+
19+ print_blue " ===> 3. pack binarys"
20+ cd " ${RELEASE_PATH} "
21+ if [ " $( uname) " == " Darwin" ]; then
22+ cp ../build/libwasmer.dylib .
23+ tar zcvf pier_v" ${APP_VERSION} " _Darwin_x86_64.tar.gz ./pier ./libwasmer.dylib
24+ else
25+ cp ../build/libwasmer.so .
26+ tar zcvf pier_v" ${APP_VERSION} " _Linux_x86_64.tar.gz ./pier ./libwasmer.so
27+ fi
You can’t perform that action at this time.
0 commit comments