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