add cicd pipeline for build and release
Some checks reported errors
continuous-integration/drone/push Build encountered an error

This commit is contained in:
Steven Polley 2024-08-15 09:30:36 -06:00
parent 35394b056d
commit 7a5e58b5a3

64
.drone.yml Normal file
View File

@ -0,0 +1,64 @@
kind: pipeline
name: default
workspace:
base: /go
path: src/deadbeef.codes/steven/hyp
steps:
- name: build csv2xls linux-amd64
image: golang
pull: always
volumes:
- name: publicrelease
path: /dist
environment:
GOOS: linux
GOARCH: amd64
CGO_ENABLED: 0
commands:
- go version
- go get
- mkdir /dist -p
- go build -a -ldflags '-w' -o /dist/csv2xls-linux-amd64 .
- cp csv2xls
- name: build csv2xls windows-amd64
image: golang
pull: always
volumes:
- name: publicrelease
path: /dist
environment:
GOOS: windows
GOARCH: amd64
CGO_ENABLED: 0
commands:
- go version
- go get
- go build -a -ldflags '-w' -o /dist/csv2xls-windows-amd64.exe .
- name: release
image: plugins/gitea-release
pull: always
volumes:
- name: publicrelease
path: /dist
settings:
api_key:
from_secret: drone_token
base_url: https://code.stevenpolley.net
files: /dist/*
when:
event:
- tag
volumes:
- name: publicrelease
host:
path: /data/public/build/csv2xls