hugo/.circleci/config.yml
Bjørn Erik Pedersen 0fc2ce9e4b
Update to Go 1.17
Go 1.17 now lazy-loads dependencies when `go.mod` is version `go17`. This does not work for us for new projects started with `hugo mod init`.

Before this commit, starting a project with Go 1.17 with `hugo mod init` and then start adding dependencies with transitive dependenies to `config.toml` would treat the transitive dependencies as new, and you would potentially get a too recent version of those.

Note that this does not effect existing projects, where all dependencies are already recorded in `go.mod`.

Fixes #8930
2021-08-31 11:19:51 +02:00

53 lines
1.2 KiB
YAML

defaults: &defaults
docker:
- image: bepsays/ci-goreleaser:1.17.0
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
go test -p 1 ./...
- 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