diff --git a/.repo-runner.yaml b/.repo-runner.yaml index 115f019..0318246 100644 --- a/.repo-runner.yaml +++ b/.repo-runner.yaml @@ -4,7 +4,8 @@ image: "quay.io/luzifer/repo-runner-image" checkout_dir: /go/src/github.com/Luzifer/worktime commands: - - make ci + - make publish environment: CGO_ENABLED: 0 + ARCHS: linux/386 linux/amd64 linux/arm darwin/amd64 darwin/386 windows/386 windows/amd64 diff --git a/Makefile b/Makefile index 4dc3793..9338123 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,3 @@ -default: ci - -ci: - ./publish.sh +publish: + curl -sSLo golang.sh https://raw.githubusercontent.com/Luzifer/github-publish/master/golang.sh + bash golang.sh diff --git a/publish.sh b/publish.sh deleted file mode 100755 index 5703623..0000000 --- a/publish.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/sh - -VERSION=$(git describe --tags --exact-match) -REPO=$(basename $(pwd)) -ARCHS="linux/386 linux/amd64 linux/arm darwin/amd64 darwin/386 windows/386 windows/amd64" - -set -e - -if [ -z "${VERSION}" ]; then - echo "No tag present, stopping build now." - exit 0 -fi - -if [ -z "${GITHUB_TOKEN}" ]; then - echo "Please set \$GITHUB_TOKEN environment variable" - exit 1 -fi - -set -x - -go get github.com/aktau/github-release -go get github.com/mitchellh/gox - -github-release release --user Luzifer --repo ${REPO} --tag ${VERSION} --name ${VERSION} || true - -gox -ldflags="-X main.version=${VERSION}" -osarch="${ARCHS}" -sha256sum ${REPO}_* > SHA256SUMS - -for file in ${REPO}_* SHA256SUMS; do - github-release upload --user Luzifer --repo ${REPO} --tag ${VERSION} --name ${file} --file ${file} -done