2017-09-10 15:14:02 +00:00
|
|
|
defaults: &defaults
|
|
|
|
working_directory: /go/src/github.com/gohugoio
|
|
|
|
docker:
|
2018-08-15 07:32:17 +00:00
|
|
|
- image: bepsays/ci-goreleaser:0.79.0-2
|
2017-09-10 15:14:02 +00:00
|
|
|
|
|
|
|
version: 2
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
<<: *defaults
|
|
|
|
steps:
|
|
|
|
- checkout:
|
|
|
|
path: hugo
|
|
|
|
- run:
|
|
|
|
command: |
|
2017-10-19 05:26:27 +00:00
|
|
|
go get -d github.com/magefile/mage/...
|
2017-09-10 15:14:02 +00:00
|
|
|
git clone git@github.com:gohugoio/hugoDocs.git
|
|
|
|
cd hugo
|
2017-10-18 05:56:10 +00:00
|
|
|
mage vendor
|
|
|
|
mage check
|
2017-09-10 15:14:02 +00:00
|
|
|
- persist_to_workspace:
|
|
|
|
root: .
|
|
|
|
paths: .
|
|
|
|
release:
|
|
|
|
<<: *defaults
|
|
|
|
steps:
|
|
|
|
- attach_workspace:
|
|
|
|
at: /go/src/github.com/gohugoio
|
|
|
|
- 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
|