kind: pipeline type: docker name: build go steps: - name: build linux/amd64 image: golang commands: - go build -ldflags "-X main.version=${DRONE_TAG}" -o release/linux/amd64/ubnt-freifunk-map-api . - tar -cvzf release/ubnt-freifunk-map-api_linux_amd64.tar.gz -C release/linux/amd64 ubnt-freifunk-map-api environment: GOARCH: amd64 GOOS: linux - name: build linux/arm64 image: golang commands: - go build -ldflags "-X main.version=${DRONE_TAG}" -o release/linux/arm64/ubnt-freifunk-map-api . - tar -cvzf release/ubnt-freifunk-map-api_linux_arm64.tar.gz -C release/linux/arm64 ubnt-freifunk-map-api environment: GOARCH: arm64 GOOS: linux - name: build windows image: golang commands: - go build -ldflags "-X main.version=${DRONE_TAG}" -o release/windows/amd64/ubnt-freifunk-map-api . - tar -cvzf release/ubnt-freifunk-map-api_windows_amd64.tar.gz -C release/windows/amd64 ubnt-freifunk-map-api environment: GOARCH: amd64 GOOS: windows - name: docker image: plugins/docker settings: repo: fftdf/ffmap-ubnt-api username: from_secret: docker_username password: from_secret: docker_password when: event: tag