diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..39f2b96 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,46 @@ +workspace: + base: /go + path: src/github.com/Indexyz/go-torch + +kind: pipeline +name: default + +steps: + - name: build + image: golang:latest + environment: + GOPATH: /go + CGO_ENABLED: '0' + commands: + - go get -u github.com/golang/dep/cmd/dep + - dep ensure -v + - mkdir builds + - GOOS=linux GOARCH=amd64 go build -o builds/torch-linux-amd64 + - GOOS=linux GOARCH=arm go build -o builds/torch-linux-arm + - GOOS=darwin GOARCH=amd64 go build -o builds/torch-darwin-amd64 + - GOOS=freebsd GOARCH=amd64 go build -o builds/torch-freebsd-amd64 + - GOOS=windows GOARCH=amd64 go build -o builds/torch-windows-amd64.exe + + - name: github_release + image: plugins/github-release + when: + event: tag + settings: + files: + - builds/* + checksum: + - sha1 + - sha256 + api_key: + from_secret: github_token + + + - name: docker_release + image: plugins/docker + settings: + repo: indexyz/torch-go + auto_tag: true + username: + from_secret: docker_username + password: + from_secret: docker_password \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..4527841 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,3 @@ +FROM alpine +COPY builds/torch-linux-amd64 /bin/torch +ENTRYPOINT ["/bin/torch"] \ No newline at end of file