diff --git a/.drone.yml b/.drone.yml index 3070f33..8297f6a 100644 --- a/.drone.yml +++ b/.drone.yml @@ -12,6 +12,78 @@ steps: --- kind: pipeline +name: test-build + +steps: +- name: prepare + image: golang + commands: + - go version + +- name: build-linux-amd64 + image: golang + environment: + GOOS: linux + GOARCH: amd64 + commands: + - go get + - go build -o cmw-linux-amd64 + depends_on: + - prepare + +- name: build-darwin-amd64 + image: golang + environment: + GOOS: darwin + GOARCH: amd64 + commands: + - go get + - go build -o cmw-darwin-amd64 + depends_on: + - prepare + +- name: build-windows-amd64 + image: golang + environment: + GOOS: windows + GOARCH: amd64 + commands: + - go get + - go build -o cmw-windows-amd64.exe + depends_on: + - prepare + +- name: build-linux-arm64 + image: golang + environment: + GOOS: linux + GOARCH: arm64 + commands: + - go get + - go build -o cmw-linux-arm64 + depends_on: + - prepare + +- name: build-darwin-arm64 + image: golang + environment: + GOOS: darwin + GOARCH: arm64 + commands: + - go get + - go build -o cmw-darwin-arm64 + depends_on: + - prepare + +depends_on: + - test + +trigger: + event: + exclude: + - tag +--- +kind: pipeline name: build steps: @@ -49,7 +121,7 @@ steps: GOARCH: amd64 commands: - go get - - go build -o bin/cmw-windows-amd64 + - go build -o bin/cmw-windows-amd64.exe depends_on: - prepare @@ -94,4 +166,8 @@ steps: - build-darwin-arm64 depends_on: - - test + - test-build + +trigger: + event: + - tag