Compare commits

...

5 Commits

Author SHA1 Message Date
Jim McDonald
1c2385e413 Catch potential error 2020-07-21 16:09:56 +01:00
Jim McDonald
c06a709463 Update workflow 2020-07-21 15:57:37 +01:00
Jim McDonald
735cc3ae4b Update workflow 2020-07-21 15:31:12 +01:00
Jim McDonald
2da00b3930 Update workflow 2020-07-21 14:45:58 +01:00
Jim McDonald
f5db041ad8 Update workflow 2020-07-21 13:01:39 +01:00

View File

@@ -2,9 +2,9 @@ name: Go
on:
push:
# branches: [ master ]
tags:
- 'v*'
branches: [ master ]
# tags:
# - 'v*'
jobs:
build:
@@ -23,11 +23,11 @@ jobs:
- name: Get dependencies
run: |
go get -v -t -d ./...
if [ -f Gopkg.toml ]; then
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
dep ensure
fi
go get -v -t -d ./...
if [ -f Gopkg.toml ]; then
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
dep ensure
fi
- name: Build
run: go build -v .
@@ -38,9 +38,15 @@ jobs:
- name: Set env
run: |
echo '::set-env name=GO111MODULE::on'
RELEASE_TAG=$(echo ${GITHUB_REF} | sed -e 's!.*/!!')
echo "::set-env name=RELEASE_TAG::${RELEASE_TAG}"
# Ensure the release tag is set and a version.
echo "${RELEASE_TAG}" | grep -q '^v' || exit 1
- name: Fetch xgo
run: go get github.com/suburbandad/xgo
run: |
env
go get github.com/suburbandad/xgo
- name: Cross-compile
run: xgo -v -x --targets="linux/amd64,linux/arm64,windows/amd64" github.com/wealdtech/ethdo
@@ -48,17 +54,17 @@ jobs:
- name: Create windows zip file
run: |
mv ethdo-windows-4.0-amd64.exe ethdo.exe
zip --junk-paths ethdo-${GITHUB_REF}-windows-exe.zip ethdo.exe
zip --junk-paths ethdo-${RELEASE_TAG}-windows-exe.zip ethdo.exe
- name: Create linux AMD64 tgz file
run: |
mv ethdo-linux-amd64 ethdo
tar zcf ethdo-${GITHUB_REF}-linux-amd64.tar.gz ethdo
tar zcf ethdo-${RELEASE_TAG}-linux-amd64.tar.gz ethdo
- name: Create linux ARM64 tgz file
run: |
mv ethdo-linux-arm64 ethdo
tar zcf ethdo-${GITHUB_REF}-linux-arm64.tar.gz ethdo
tar zcf ethdo-${RELEASE_TAG}-linux-arm64.tar.gz ethdo
- name: Create release
id: create_release
@@ -68,7 +74,7 @@ jobs:
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
draft: true
prerelease: true
- name: Upload windows zip file