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:48:23 +02:00
parent 59a783efd8
commit 68ce22a4f0

View File

@ -54,20 +54,34 @@ type: docker
name: gitea-release name: gitea-release
environment: environment:
GOOS: linux
GOOPTIONS: -mod=vendor GOOPTIONS: -mod=vendor
SRCFILES: cmd/go-aptproxy/*.go SRCFILES: cmd/go-aptproxy/*.go
PROJECTNAME: go-aptproxy PROJECTNAME: go-aptproxy
steps: steps:
- name: build - name: build-amd64
image: golang image: golang
environment:
GOARCH: amd64
commands: commands:
- export VERSION=$DRONE_TAG - export VERSION=$DRONE_TAG
- go generate $SRCFILES - go generate $SRCFILES
- go build -o $PROJECTNAME $GOOPTIONS $SRCFILES - go build -o $PROJECTNAME $GOOPTIONS $SRCFILES
- tar -czvf $PROJECTNAME-$DRONE_TAG-linux-amd64.tar.gz $PROJECTNAME - tar -czvf $PROJECTNAME-$DRONE_TAG-$GOOS-$GOARCH.tar.gz $PROJECTNAME
- echo $PROJECTNAME $DRONE_TAG > VERSION
when:
event:
- tag
- name: build-arm64
image: golang
environment:
GOARCH: arm64
commands:
- export VERSION=$DRONE_TAG
- go generate $SRCFILES
- go build -o $PROJECTNAME $GOOPTIONS $SRCFILES - go build -o $PROJECTNAME $GOOPTIONS $SRCFILES
- tar -czvf $PROJECTNAME-$DRONE_TAG-linux-arm64.tar.gz $PROJECTNAME - tar -czvf $PROJECTNAME-$DRONE_TAG-$GOOS-$GOARCH.tar.gz $PROJECTNAME
- echo $PROJECTNAME $DRONE_TAG > VERSION - echo $PROJECTNAME $DRONE_TAG > VERSION
when: when:
event: event: