diff --git a/.cli.sh b/.cli.sh index 3ba7e311e..5bb119011 100755 --- a/.cli.sh +++ b/.cli.sh @@ -6,11 +6,11 @@ set -x export CGO_ENABLED=0 # compile for all architectures -GOOS=linux GOARCH=amd64 go build -ldflags "-X main.version=${DRONE_TAG##v}" -o cli/release/linux/amd64/woodpecker github.com/laszlocph/woodpecker/cli/woodpecker -GOOS=linux GOARCH=arm64 go build -ldflags "-X main.version=${DRONE_TAG##v}" -o cli/release/linux/arm64/woodpecker github.com/laszlocph/woodpecker/cli/woodpecker -GOOS=linux GOARCH=arm go build -ldflags "-X main.version=${DRONE_TAG##v}" -o cli/release/linux/arm/woodpecker github.com/laszlocph/woodpecker/cli/woodpecker -GOOS=windows GOARCH=amd64 go build -ldflags "-X main.version=${DRONE_TAG##v}" -o cli/release/windows/amd64/woodpecker github.com/laszlocph/woodpecker/cli/woodpecker -GOOS=darwin GOARCH=amd64 go build -ldflags "-X main.version=${DRONE_TAG##v}" -o cli/release/darwin/amd64/woodpecker github.com/laszlocph/woodpecker/cli/woodpecker +GOOS=linux GOARCH=amd64 go build -ldflags "-X main.version=${DRONE_TAG##v}" -o cli/release/linux/amd64/woodpecker github.com/laszlocph/woodpecker/cli/drone +GOOS=linux GOARCH=arm64 go build -ldflags "-X main.version=${DRONE_TAG##v}" -o cli/release/linux/arm64/woodpecker github.com/laszlocph/woodpecker/cli/drone +GOOS=linux GOARCH=arm go build -ldflags "-X main.version=${DRONE_TAG##v}" -o cli/release/linux/arm/woodpecker github.com/laszlocph/woodpecker/cli/drone +GOOS=windows GOARCH=amd64 go build -ldflags "-X main.version=${DRONE_TAG##v}" -o cli/release/windows/amd64/woodpecker github.com/laszlocph/woodpecker/cli/drone +GOOS=darwin GOARCH=amd64 go build -ldflags "-X main.version=${DRONE_TAG##v}" -o cli/release/darwin/amd64/woodpecker github.com/laszlocph/woodpecker/cli/drone # tar binary files prior to upload tar -cvzf cli/release/woodpecker_linux_amd64.tar.gz -C cli/release/linux/amd64 woodpecker diff --git a/.drone.yml b/.drone.yml index 3ef861888..cd3a8bdbd 100644 --- a/.drone.yml +++ b/.drone.yml @@ -4,7 +4,7 @@ clone: pipeline: test: - image: golang:1.13.3 + image: golang:1.16 group: test commands: - go test -cover -timeout 30s $(go list ./...) @@ -19,7 +19,7 @@ pipeline: - make test-frontend test-postgres: - image: golang:1.13.3 + image: golang:1.16 group: db-test environment: - DATABASE_DRIVER=postgres @@ -28,7 +28,7 @@ pipeline: - go test -timeout 30s github.com/laszlocph/woodpecker/store/datastore test-mysql: - image: golang:1.13.3 + image: golang:1.16 group: db-test environment: - DATABASE_DRIVER=mysql @@ -42,7 +42,7 @@ pipeline: - make build-frontend build: - image: golang:1.13.3 + image: golang:1.16 commands: - go get github.com/laszlocph/togo - (cd web/; go generate ./...) @@ -60,6 +60,10 @@ pipeline: # branch: master # event: push + build-cli: + image: golang:1.16 + commands: sh .cli.sh + publish-server: image: plugins/docker repo: laszlocloud/woodpecker-server @@ -124,6 +128,17 @@ pipeline: when: event: tag + release-cli: + image: plugins/github-release + files: + - release/drone_*.tar.gz + - release/drone_checksums.txt + secrets: + - source: github_token + target: github_release_api_key + when: + event: tag + services: postgres: image: postgres:9.6 diff --git a/cli/.drone.yml b/cli/.drone.yml index 14afd6ca0..4bda077bc 100644 --- a/cli/.drone.yml +++ b/cli/.drone.yml @@ -48,8 +48,8 @@ pipeline: release: image: plugins/github-release files: - - release/drone_*.tar.gz - - release/drone_checksums.txt + - release/woodpecker_*.tar.gz + - release/woodpecker_checksums.txt secrets: - source: github_token target: github_release_api_key