SCB-1480 build arm64, add release script (#30)

diff --git a/build/build_server.sh b/build/build_server.sh
index 099f64c..8b94b53 100755
--- a/build/build_server.sh
+++ b/build/build_server.sh
@@ -1,5 +1,4 @@
 #!/usr/bin/env bash
-set -x
 # Licensed to the Apache Software Foundation (ASF) under one or more
 # contributor license agreements.  See the NOTICE file distributed with
 # this work for additional information regarding copyright ownership.
@@ -40,17 +39,17 @@
 fi
 
 mkdir -p ${release_dir}/conf
-pkg_name="servicecomb-kie-$version-linux-amd64.tar.gz"
+
 
 export GIT_COMMIT=`git rev-parse HEAD | cut -b 1-7`
 echo "build from ${GIT_COMMIT}"
 
 
-echo "building..."
+echo "building x86..."
 go build -o ${release_dir}/kie github.com/apache/servicecomb-kie/cmd/kieserver
 
 writeConfig(){
-echo "write template config..."
+echo "write chassis config..."
 cat <<EOM > ${release_dir}/conf/chassis.yaml
 cse:
   service:
@@ -67,7 +66,7 @@
       Provider:
         default: auth-handler,ratelimiter-provider
 EOM
-
+echo "write miroservice config..."
 cat <<EOM > ${release_dir}/conf/microservice.yaml
 service_description:
   name: servicecomb-kie
@@ -76,7 +75,7 @@
 
 cat <<EOM > ${release_dir}/conf/kie-conf.yaml
 db:
-  uri: mongodb://admin:123@127.0.0.1:27017/kie
+  uri: mongodb://root:root@127.0.0.1:27017/kie
   type: mongodb
   poolSize: 10
   ssl: false
@@ -87,14 +86,24 @@
 
 writeConfig
 
-echo "packaging tar.gz..."
+component="apache-servicecomb-kie"
+x86_pkg_name="$component-$VERSION-linux-amd64.tar.gz"
+arm_pkg_name="$component-$VERSION-linux-arm64.tar.gz"
+
+echo "packaging x86 tar.gz..."
 cd ${release_dir}
-tar zcf ${pkg_name} conf kie
-
-
+tar zcf ${x86_pkg_name} conf kie
 
 echo "building docker..."
 cp ${PROJECT_DIR}/scripts/start.sh ./
 cp ${PROJECT_DIR}/build/docker/server/Dockerfile ./
 sudo docker version
-sudo docker build -t servicecomb/kie:${version} .
\ No newline at end of file
+sudo docker build -t servicecomb/kie:${version} .
+
+
+echo "building arm64"
+GOARCH=arm64  go build -o ${release_dir}/kie github.com/apache/servicecomb-kie/cmd/kieserver
+echo "packaging arm64 tar.gz..."
+cd ${release_dir}
+tar zcf ${arm_pkg_name} conf kie
+
diff --git a/build/release.sh b/build/release.sh
new file mode 100755
index 0000000..14aaf41
--- /dev/null
+++ b/build/release.sh
@@ -0,0 +1,39 @@
+#!/usr/bin/env bash
+
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+export BUILD_DIR=$(cd "$(dirname "$0")"; pwd)
+export PROJECT_DIR=$(dirname ${BUILD_DIR})
+
+component="apache-servicecomb-kie"
+x86_pkg_name="$component-$VERSION-linux-amd64.tar.gz"
+arm_pkg_name="$component-$VERSION-linux-arm64.tar.gz"
+cd $PROJECT_DIR/release/kie
+#asc
+gpg --armor --output "${x86_pkg_name}".asc --detach-sig "${x86_pkg_name}"
+gpg --armor --output "${arm_pkg_name}".asc --detach-sig "${arm_pkg_name}"
+#512
+gpg --print-md SHA512 "${x86_pkg_name}" > "${x86_pkg_name}".sha512
+gpg --print-md SHA512 "${arm_pkg_name}" > "${arm_pkg_name}".sha512
+#src
+wget "https://github.com/apache/servicecomb-kie/archive/v${VERSION}.tar.gz"
+
+src_name="${component}-${VERSION}-src.tar.gz"
+mv "v${VERSION}.tar.gz" "${src_name}"
+
+gpg --armor --output "$src_name.asc" --detach-sig "${src_name}"
+
+gpg --print-md SHA512 "${src_name}" > "${src_name}".sha512
\ No newline at end of file