2021-01-02 21:17:31 +00:00
|
|
|
global-variables:
|
|
|
|
env: &env
|
2021-01-02 21:21:35 +00:00
|
|
|
image: golang
|
2021-01-02 21:17:31 +00:00
|
|
|
commands:
|
|
|
|
- go build -ldflags "-X main.version=${DRONE_TAG##v}" -o release/$GOOS/$GOARCH/ubnt-freifunk-map-api .
|
|
|
|
- tar -cvzf release/ubnt-freifunk-map-api_$GOOS_$GOARCH.tar.gz -C release/$GOOS/$GOARCH ubnt-freifunk-map-api
|
|
|
|
|
2021-01-01 14:14:03 +00:00
|
|
|
kind: pipeline
|
2021-01-02 18:04:11 +00:00
|
|
|
type: docker
|
|
|
|
name: build go
|
2021-01-01 14:14:03 +00:00
|
|
|
|
2021-01-02 21:23:03 +00:00
|
|
|
steps: &steps
|
2021-01-02 18:04:11 +00:00
|
|
|
- name: build linux/amd64
|
2021-01-02 21:24:27 +00:00
|
|
|
<<: *env
|
2021-01-02 18:04:11 +00:00
|
|
|
environment:
|
|
|
|
GOARCH: amd64
|
|
|
|
GOOS: linux
|
|
|
|
|
|
|
|
- name: build linux/arm64
|
2021-01-02 21:24:27 +00:00
|
|
|
<<: *env
|
2021-01-02 18:04:11 +00:00
|
|
|
environment:
|
|
|
|
GOARCH: arm64
|
|
|
|
GOOS: linux
|
|
|
|
|
|
|
|
- name: build windows
|
2021-01-02 21:24:27 +00:00
|
|
|
<<: *env
|
2021-01-02 18:04:11 +00:00
|
|
|
environment:
|
|
|
|
GOARCH: amd64
|
|
|
|
GOOS: windows
|
2021-01-01 14:14:03 +00:00
|
|
|
|
2021-01-02 21:17:31 +00:00
|
|
|
- name: build macos/x64
|
2021-01-02 21:24:27 +00:00
|
|
|
<<: *env
|
2021-01-02 21:17:31 +00:00
|
|
|
environment:
|
|
|
|
GOARCH: amd64
|
|
|
|
GOOS: darwin
|
|
|
|
|
|
|
|
- name: build macos/arm64
|
2021-01-02 21:24:27 +00:00
|
|
|
<<: *env
|
2021-01-02 21:17:31 +00:00
|
|
|
environment:
|
|
|
|
GOARCH: arm64
|
|
|
|
GOOS: darwin
|
|
|
|
|
2021-01-01 14:14:03 +00:00
|
|
|
- name: docker
|
|
|
|
image: plugins/docker
|
|
|
|
settings:
|
|
|
|
repo: fftdf/ffmap-ubnt-api
|
|
|
|
username:
|
|
|
|
from_secret: docker_username
|
|
|
|
password:
|
|
|
|
from_secret: docker_password
|
|
|
|
when:
|
|
|
|
event: tag
|