---
kind: pipeline
name: default

platform:
  os: linux
  arch: amd64

workspace:
  base: /go
  path: src/github.com/metalmatze/alertmanager-bot

steps:
- name: build
  pull: always
  image: golang:1.11-alpine
  environment:
    GO111MODULE: on
  commands:
  - apk add -U git make
  - make build
  - make fmt
  - make vet
  - make lint
  - make test
  when:
    event:
    - push
    - tag
    - pull_request

- name: release
  pull: default
  image: golang:1.11-alpine
  environment:
    GO111MODULE: on
  commands:
  - apk add -U git make
  - make release
  when:
    event:
    - tag

- name: docker
  image: plugins/docker
  pull: always
  settings:
    username:
      from_secret: docker_username
    password:
      from_secret: docker_password
    repo: metalmatze/alertmanager-bot
    tag:
    - latest
    - 0.4
    - 0.4.0
  when:
    event:
    - tag

- name: github
  pull: default
  image: plugins/github-release
  settings:
    files: "dist/*"
  environment:
    github_token:
      from_secret: github_token
  when:
    event:
    - tag

...

---
kind: pipeline
name: default

platform:
  os: linux
  arch: amd64

workspace:
  base: /go
  path: src/github.com/metalmatze/alertmanager-bot

steps:
- name: build
  pull: always
  image: golang:1.11-alpine
  environment:
    GO111MODULE: on
  commands:
  - apk add -U git make
  - make build
  - make fmt
  - make vet
  - make lint
  - make test
  when:
    event:
    - push
    - tag
    - pull_request

- name: release
  pull: default
  image: golang:1.11-alpine
  environment:
    GO111MODULE: on
  commands:
  - apk add -U git make
  - make release
  when:
    event:
    - tag

- name: docker
  image: plugins/docker
  pull: always
  settings:
    username:
      from_secret: docker_username
    password:
      from_secret: docker_password
    repo: metalmatze/alertmanager-bot
    tag:
    - latest
    - 0.4
    - 0.4.0
  when:
    event:
    - tag

- name: github
  pull: default
  image: plugins/github-release
  settings:
    files: "dist/*"
  environment:
    GITHUB_TOKEN:
      from_secret: github_token
  when:
    event:
    - tag

...

Set uppercase env var for GITHUB_TOKEN
Set uppercase env var for GITHUB_TOKEN
