updated .drone.yml
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing

This commit is contained in:
Paul 2022-07-11 16:39:01 +02:00
parent 779de16854
commit e06f6c4890

View File

@ -3,10 +3,6 @@ kind: pipeline
type: docker type: docker
name: build-linux-amd64 name: build-linux-amd64
platform:
os: linux
arch: amd64
environment: environment:
GOOS: linux GOOS: linux
GOARCH: amd64 GOARCH: amd64
@ -30,54 +26,8 @@ steps:
--- ---
kind: pipeline kind: pipeline
type: docker type: docker
name: gitea-release-linux-amd64
platform:
os: linux
arch: amd64
environment:
GOOS: linux
GOARCH: amd64
GOOPTIONS: -mod=vendor
SRCFILES: cmd/go-aptproxy/*.go
PROJECTNAME: go-aptproxy
steps:
- name: build
image: golang
commands:
- export VERSION=$DRONE_TAG
- go generate $SRCFILES
- go build -o $PROJECTNAME $GOOPTIONS $SRCFILES
- tar -czvf $PROJECTNAME-$DRONE_TAG-$GOOS-$GOARCH.tar.gz $PROJECTNAME
- echo $PROJECTNAME $DRONE_TAG > VERSION
when:
event:
- tag
- 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
title: VERSION
when:
event:
- tag
---
kind: pipeline
type: docker
name: build-linux-arm64 name: build-linux-arm64
platform:
os: linux
arch: arm64
environment: environment:
GOOS: linux GOOS: linux
GOARCH: arm64 GOARCH: arm64
@ -101,15 +51,9 @@ steps:
--- ---
kind: pipeline kind: pipeline
type: docker type: docker
name: gitea-release-linux-arm64 name: gitea-release
platform:
os: linux
arch: arm64
environment: environment:
GOOS: linux
GOARCH: arm64
GOOPTIONS: -mod=vendor GOOPTIONS: -mod=vendor
SRCFILES: cmd/go-aptproxy/*.go SRCFILES: cmd/go-aptproxy/*.go
PROJECTNAME: go-aptproxy PROJECTNAME: go-aptproxy
@ -120,8 +64,11 @@ steps:
commands: commands:
- export VERSION=$DRONE_TAG - export VERSION=$DRONE_TAG
- go generate $SRCFILES - go generate $SRCFILES
- mkdir amd64 arm64
- go build -o $PROJECTNAME $GOOPTIONS $SRCFILES - go build -o $PROJECTNAME $GOOPTIONS $SRCFILES
- tar -czvf $PROJECTNAME-$DRONE_TAG-$GOOS-$GOARCH.tar.gz $PROJECTNAME - tar -czvf $PROJECTNAME-$DRONE_TAG-linux-amd64.tar.gz $PROJECTNAME
- go build -o $PROJECTNAME $GOOPTIONS $SRCFILES
- tar -czvf $PROJECTNAME-$DRONE_TAG-linux-arm64.tar.gz $PROJECTNAME
- echo $PROJECTNAME $DRONE_TAG > VERSION - echo $PROJECTNAME $DRONE_TAG > VERSION
when: when:
event: event:
@ -133,9 +80,6 @@ steps:
api_key: api_key:
from_secret: gitea_token from_secret: gitea_token
files: "*.tar.gz" files: "*.tar.gz"
checksum:
- sha256
- sha512
title: VERSION title: VERSION
when: when:
event: event: