image: golang:1.7.5

stages:
  - formatting
  - build
  - release

before_script:
  - source ci/prepare

formatting:style:
  stage: formatting
  script:
    - make fmt

formatting:lint:
  stage: formatting
  script:
    - make deps
    - make lint

build:linux:
  stage: build
  before_script:
    - source ci/prepare
    - mkdir -p ~/.ssh/
    - eval $(ssh-agent -s)
    - ssh-add <(echo "$SSH_KEY")
    - ssh-keyscan -t rsa gitlab.transip.us >> ~/.ssh/known_hosts
    - git config --global url."git@gitlab.transip.us".insteadOf "https://gitlab.transip.us/"
    - git clone git@gitlab.transip.us:swiltink/go-MusicPlayer.git
  script:
    - make deps
    - glide install
    - make build
  artifacts:
    name: "musicbot"
    expire_in: "1 week"
    paths:
      - out/binaries/
      - whitelist.txt
      - conf.json.example

release:linux:
  stage: release
  script:
    - echo "DONE"
  only:
    - tags
  artifacts:
    name: "musicbot"
    paths:
      - MusicBot
      - whitelist.txt
      - conf.json.example
image: golang:1.7.5

stages:
  - formatting
  - build
  - release

before_script:
  - source ci/prepare

formatting:style:
  stage: formatting
  script:
    - make fmt

formatting:lint:
  stage: formatting
  script:
    - make deps
    - make lint

build:linux:
  stage: build
  before_script:
    - source ci/prepare
    - mkdir -p ~/.ssh/
    - eval $(ssh-agent -s)
    - ssh-add <(echo "$SSH_KEY")
    - ssh-keyscan -t rsa gitlab.transip.us >> ~/.ssh/known_hosts
    - git config --global url."git@gitlab.transip.us".insteadOf "https://gitlab.transip.us/"
    - git clone git@gitlab.transip.us:swiltink/go-MusicPlayer.git
  script:
    - make deps
    - glide install
    - make build
  artifacts:
    name: "musicbot"
    expire_in: "1 week"
    paths:
      - out/binaries/
      - whitelist.txt
      - conf.json.example

release:linux:
  stage: release
  script:
    - echo "DONE"
  only:
    - tags
  artifacts:
    name: "musicbot"
    paths:
      - out/binaries/MusicBot
      - whitelist.txt
      - conf.json.example
Fix path for artifact on release
Fix path for artifact on release
