summaryrefslogtreecommitdiffstats
path: root/.circleci/config.yml
diff options
context:
space:
mode:
Diffstat (limited to '.circleci/config.yml')
-rw-r--r--.circleci/config.yml53
1 files changed, 53 insertions, 0 deletions
diff --git a/.circleci/config.yml b/.circleci/config.yml
new file mode 100644
index 000000000..eae7e6335
--- /dev/null
+++ b/.circleci/config.yml
@@ -0,0 +1,53 @@
+defaults: &defaults
+ working_directory: /go/src/github.com/gohugoio
+ docker:
+ - image: bepsays/ci-goreleaser:1.11-2
+ environment:
+ GO111MODULE: "on"
+ CGO_ENABLED: "0"
+
+version: 2
+jobs:
+ build:
+ <<: *defaults
+ steps:
+ - checkout:
+ path: hugo
+ - run:
+ command: |
+ git clone git@github.com:gohugoio/hugoDocs.git
+ cd hugo
+ go mod download
+ sleep 5
+ go test -p 1 ./...
+ - 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