You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
499 B

4 years ago
4 years ago
4 years ago
4 years ago
  1. kind: pipeline
  2. name: default
  3. steps:
  4. - name: build
  5. image: golang:1.11
  6. pull: true
  7. environment:
  8. CGO_ENABLED: 0
  9. GOOS: linux
  10. GOARCH: amd64
  11. commands:
  12. - export FILENAME=${DRONE_REPO_NAME}-${GOOS}-${GOARCH}
  13. - if [ "$GOOS" = "windows" ]; then export FILENAME=$FILENAME.exe; fi
  14. - go build -ldflags "-s -w" -o dist/$FILENAME
  15. - name: release
  16. image: plugins/github-release
  17. settings:
  18. files:
  19. - dist/*
  20. api_key:
  21. from_secret: github_token
  22. when:
  23. event:
  24. - tag