kind: pipeline
name: default
steps:
- name: create dist
image: alpine:latest
commands:
- mkdir dist
- cp settings.yml.dist dist/settings.yml
when:
event: tag
- name: Go Windows
image: golang:latest
- GOOS=windows go build -o dist/twitch-data-collector.exe *.go
- cd dist && zip twitch-data-collector-win-${DRONE_TAG}.zip twitch-data-collector.exe settings.yml && rm twitch-data-collector.exe
- name: Go Linux AMD64
- GOOS=linux GOARCH=amd64 go build -o dist/twitch-data-collector *.go
- cd dist && zip twitch-data-collector-linux-amd64-${DRONE_TAG}.zip twitch-data-collector settings.yml && twitch-data-collector
- name: Go Linux ARM
- GOOS=linux GOARCH=arm go build -o dist/twitch-data-collector *.go
- cd dist && zip twitch-data-collector-linux-arm-${DRONE_TAG}.zip twitch-data-collector settings.yml && twitch-data-collector
- name: gitea_release
image: plugins/gitea-release
settings:
api_key:
from_secret: gitea_api_key
base_url: https://git.mthie.com
files:
- dist/*
title: ${DRONE_TAG}
note: CHANGELOG.md
checksum:
- md5
- sha1
- sha256
- sha512
- adler32
- crc32