ubnt-freifunk-map-api/.drone.yml
Stefan Hoffmann 40fcff34b6
All checks were successful
continuous-integration/drone/push Build is passing
CI and Dockerfile updated
2021-01-02 19:04:11 +01:00

61 lines
1.6 KiB
YAML

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
- name: gitea_release
image: plugins/gitea-release
settings:
api_key:
from_secret: gitea_api_key
base_url: https://git.freifunk-rhein-sieg.net
files:
- release/*.tar.gz
title: ${DRONE_TAG}
checksum:
- md5
- sha1
- sha256
- sha512
- adler32
- crc32
when:
event: tag