2017-09-10 11:14:02 -04:00
|
|
|
defaults: &defaults
|
|
|
|
docker:
|
2020-03-21 07:25:03 -04:00
|
|
|
- image: bepsays/ci-goreleaser:1.14.1-t
|
2018-08-28 12:36:30 -04:00
|
|
|
environment:
|
|
|
|
CGO_ENABLED: "0"
|
|
|
|
|
2017-09-10 11:14:02 -04:00
|
|
|
version: 2
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
<<: *defaults
|
|
|
|
steps:
|
|
|
|
- checkout:
|
|
|
|
path: hugo
|
|
|
|
- run:
|
|
|
|
command: |
|
|
|
|
git clone git@github.com:gohugoio/hugoDocs.git
|
|
|
|
cd hugo
|
2018-08-28 12:36:30 -04:00
|
|
|
go mod download
|
|
|
|
sleep 5
|
2020-02-15 15:00:15 -05:00
|
|
|
go mod verify
|
2018-08-28 16:38:46 -04:00
|
|
|
go test -p 1 ./...
|
2017-09-10 11:14:02 -04:00
|
|
|
- persist_to_workspace:
|
|
|
|
root: .
|
|
|
|
paths: .
|
|
|
|
release:
|
|
|
|
<<: *defaults
|
|
|
|
steps:
|
|
|
|
- attach_workspace:
|
2018-09-22 21:34:51 -04:00
|
|
|
at: /root/project
|
2017-09-10 11:14:02 -04:00
|
|
|
- run:
|
|
|
|
command: |
|
|
|
|
cd hugo
|
|
|
|
git config --global user.email "bjorn.erik.pedersen+hugoreleaser@gmail.com"
|
|
|
|
git config --global user.name "hugoreleaser"
|
|
|
|
go run -tags release main.go release -r ${CIRCLE_BRANCH}
|
|
|
|
|
|
|
|
workflows:
|
|
|
|
version: 2
|
|
|
|
release:
|
|
|
|
jobs:
|
|
|
|
- build:
|
|
|
|
filters:
|
|
|
|
branches:
|
|
|
|
only: /release-.*/
|
|
|
|
- hold:
|
|
|
|
type: approval
|
|
|
|
requires:
|
|
|
|
- build
|
|
|
|
- release:
|
|
|
|
context: org-global
|
|
|
|
requires:
|
|
|
|
- hold
|