mirror of
https://github.com/itzg/mc-router.git
synced 2024-11-28 12:35:21 +01:00
51 lines
998 B
YAML
51 lines
998 B
YAML
version: 2
|
|
|
|
defaults: &defaults
|
|
docker:
|
|
# specify the version
|
|
- image: circleci/golang:1.12.5
|
|
|
|
jobs:
|
|
build:
|
|
<<: *defaults
|
|
steps:
|
|
- checkout
|
|
|
|
- restore_cache:
|
|
keys:
|
|
- cache-{{ arch }}-{{ .Branch }}-{{ checksum "go.sum" }}
|
|
- cache-{{ arch }}-{{ .Branch }}
|
|
- cache
|
|
|
|
- run: make test
|
|
|
|
- save_cache:
|
|
key: cache-{{ arch }}-{{ .Branch }}-{{ checksum "go.sum" }}
|
|
paths:
|
|
- /go/pkg
|
|
|
|
release:
|
|
<<: *defaults
|
|
steps:
|
|
- checkout
|
|
|
|
- setup_remote_docker
|
|
- run: echo $DOCKER_PASSWORD | docker login -u $DOCKER_USER --password-stdin
|
|
- run: make release
|
|
|
|
workflows:
|
|
version: 2
|
|
incremental:
|
|
jobs:
|
|
- build:
|
|
filters:
|
|
tags:
|
|
ignore: /^\d+\.\d+\.\d+/
|
|
release:
|
|
jobs:
|
|
- release:
|
|
filters:
|
|
tags:
|
|
only: /^\d+\.\d+\.\d+(-\d+)?/
|
|
branches:
|
|
ignore: /.*/ |