weather/.drone.yml

86 lines
1.8 KiB
YAML
Raw Normal View History

2020-12-04 20:04:44 +01:00
---
kind: pipeline
type: docker
2022-10-30 16:07:42 +01:00
name: build-linux
2020-12-04 20:04:44 +01:00
steps:
2022-10-30 16:07:42 +01:00
- name: build-linux-amd64
image: golang
2020-12-04 20:04:44 +01:00
commands:
2022-10-30 16:07:42 +01:00
- go build -o $PROJECTNAME $GOOPTIONS $SRCFILES
environment:
GOOS: linux
GOARCH: amd64
GOOPTIONS: -mod=vendor
SRCFILES: cmd/weather/*.go
PROJECTNAME: weather
2020-12-04 20:04:44 +01:00
when:
2022-10-30 16:07:42 +01:00
event:
exclude:
- tag
- name: build-linux-arm64
image: golang
commands:
- go build -o $PROJECTNAME $GOOPTIONS $SRCFILES
environment:
GOOS: linux
GOARCH: arm64
GOOPTIONS: -mod=vendor
SRCFILES: cmd/weather/*.go
PROJECTNAME: weather
when:
event:
exclude:
- tag
2020-12-04 20:04:44 +01:00
2020-04-26 10:39:15 +02:00
---
kind: pipeline
type: docker
2022-10-30 16:07:42 +01:00
name: gitea-release-linux
2020-04-26 10:39:15 +02:00
steps:
2022-10-30 16:07:42 +01:00
- name: build-linux-amd64
2020-04-26 10:39:15 +02:00
image: golang
commands:
2022-10-30 16:07:42 +01:00
- go build -o $PROJECTNAME $GOOPTIONS $SRCFILES
- tar -czvf $PROJECTNAME-$DRONE_TAG-$GOOS-$GOARCH.tar.gz $PROJECTNAME
- echo $PROJECTNAME $DRONE_TAG > VERSION
2020-04-26 10:39:15 +02:00
environment:
GOOS: linux
GOARCH: amd64
2022-10-30 16:07:42 +01:00
GOOPTIONS: -mod=vendor
SRCFILES: cmd/weather/*.go
PROJECTNAME: weather
when:
event:
- tag
- name: build-linux-arm64
2020-04-26 10:39:15 +02:00
image: golang
commands:
2022-10-30 16:07:42 +01:00
- go build -o $PROJECTNAME $GOOPTIONS $SRCFILES
- tar -czvf $PROJECTNAME-$DRONE_TAG-$GOOS-$GOARCH.tar.gz $PROJECTNAME
- echo $PROJECTNAME $DRONE_TAG > VERSION
2020-04-26 10:39:15 +02:00
environment:
GOOS: linux
GOARCH: arm64
2022-10-30 16:07:42 +01:00
GOOPTIONS: -mod=vendor
SRCFILES: cmd/weather/*.go
PROJECTNAME: weather
2020-12-04 20:04:44 +01:00
when:
2022-10-30 16:07:42 +01:00
event:
- tag
2020-04-26 10:39:15 +02:00
- name: release
image: plugins/gitea-release
settings:
base_url: https://git.paulbsd.com
api_key:
from_secret: gitea_token
files: "*.tar.gz"
checksum:
- sha256
- sha512
2020-12-04 20:04:44 +01:00
title: VERSION
when:
2022-10-30 16:07:42 +01:00
event:
- tag