mirror of
https://github.com/jimeh/casecmp.git
synced 2026-02-19 02:16:40 +00:00
66 lines
1.5 KiB
YAML
66 lines
1.5 KiB
YAML
version: 2
|
|
jobs:
|
|
build:
|
|
docker:
|
|
- image: circleci/golang:1.16
|
|
working_directory: /go/src/github.com/jimeh/casecmp
|
|
steps:
|
|
- checkout
|
|
- run:
|
|
name: Install dependencies
|
|
command: go mod download
|
|
- run:
|
|
name: Build binary
|
|
command: make
|
|
- run:
|
|
name: Start service
|
|
command: ./bin/casecmp --port=8080
|
|
background: true
|
|
- run:
|
|
name: Validate service is working
|
|
command: |
|
|
curl --retry 10 --retry-delay 1 --retry-connrefused \
|
|
http://localhost:8080/
|
|
release:
|
|
docker:
|
|
- image: circleci/golang:1.16
|
|
working_directory: /go/src/github.com/jimeh/casecmp
|
|
steps:
|
|
- checkout
|
|
- run:
|
|
name: Install tools
|
|
command: |
|
|
go get github.com/goreleaser/goreleaser
|
|
- run:
|
|
name: Install dependencies
|
|
command: go mod download
|
|
- run:
|
|
name: Run goreleaser
|
|
command: goreleaser
|
|
workflows:
|
|
version: 2
|
|
build:
|
|
jobs:
|
|
- build:
|
|
filters:
|
|
branches:
|
|
only: /.*/
|
|
tags:
|
|
ignore: /^v[0-9]+(\.[0-9]+)*/
|
|
build-and-release:
|
|
jobs:
|
|
- build:
|
|
filters:
|
|
branches:
|
|
ignore: /.*/
|
|
tags:
|
|
only: /^v[0-9]+(\.[0-9]+)*/
|
|
- release:
|
|
requires:
|
|
- build
|
|
filters:
|
|
branches:
|
|
ignore: /.*/
|
|
tags:
|
|
only: /^v[0-9]+(\.[0-9]+)*/
|