aboutsummaryrefslogtreecommitdiffhomepage
path: root/.circleci/config.yml
blob: 7027383d41470b2671ce999b30aecbc633bf4e78 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
defaults: &defaults
  docker:
      - image: bepsays/ci-goreleaser:1.1800.000
  environment:
    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 mod verify
      - persist_to_workspace:
          root: .
          paths: .
  release:
    <<: *defaults
    steps:
      - attach_workspace:
          at: /root/project
      - 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