From 9939b75bdf7391f9a54c5f2cf0919e249a85ea86 Mon Sep 17 00:00:00 2001 From: Elia el Lazkani Date: Sun, 2 Jul 2023 21:37:43 +0200 Subject: [PATCH] chore(): Adds a pipeline based on tagging --- .drone.yml | 80 ++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 78 insertions(+), 2 deletions(-) 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