updated .drone.yml
This commit is contained in:
parent
59a783efd8
commit
68ce22a4f0
20
.drone.yml
20
.drone.yml
@ -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:
|
||||||
|
Loading…
Reference in New Issue
Block a user