github.com/droot/goreleaser@v0.66.2-0.20180420030140-c2db5fb17157/docs/140-ci.md (about) 1 --- 2 title: Continuous Integration 3 --- 4 5 GoReleaser was built from the very first commit with the idea of 6 running it as part of the CI pipeline in mind. 7 8 Let's see how we can get it working on popular CI softwares. 9 10 ## Travis 11 12 You may want to setup your project to auto-deploy your new tags on 13 [Travis](https://travis-ci.org), for example: 14 15 ```yaml 16 # .travis.yml 17 language: go 18 19 addons: 20 apt: 21 packages: 22 # needed for the nfpm pipe: 23 - rpm 24 # needed for the snap pipe: 25 - snapcraft 26 27 env: 28 # needed for the snap pipe: 29 - PATH=/snap/bin:$PATH 30 31 install: 32 # needed for the snap pipe: 33 - sudo snap install snapcraft --classic 34 35 # needed for the docker pipe 36 services: 37 - docker 38 39 # calls goreleaser 40 deploy: 41 - provider: script 42 skip_cleanup: true 43 script: curl -sL https://git.io/goreleaser | bash 44 on: 45 tags: true 46 condition: $TRAVIS_OS_NAME = linux 47 ``` 48 49 Note the last line (`condition: $TRAVIS_OS_NAME = linux`): it is important 50 if you run a build matrix with multiple Go versions and/or multiple OSes. If 51 that's the case you will want to make sure GoReleaser is run just once. 52 53 # Circle 54 55 Here is how to do it with [CircleCI](https://circleci.com): 56 57 ```yml 58 # circle.yml 59 deployment: 60 tag: 61 tag: /v[0-9]+(\.[0-9]+)*(-.*)*/ 62 owner: user 63 commands: 64 - curl -sL https://git.io/goreleaser | bash 65 ```