diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..8eb4904 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,54 @@ +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 + commands: + - 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 + when: + event: tag + +- name: Go Linux AMD64 + image: golang:latest + commands: + - 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 + when: + event: tag + +- name: Go Linux ARM + image: golang:latest + commands: + - 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 + when: + event: tag + +- 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 + when: + event: tag