diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml new file mode 100644 index 00000000..4ab21db3 --- /dev/null +++ b/.github/workflows/documentation.yml @@ -0,0 +1,72 @@ +name: Documentation + +on: + push: + branches: + - master + +jobs: + + doc: + name: Build and deploy documentation + runs-on: ubuntu-latest + env: + GO_VERSION: 1.18 + HUGO_VERSION: 0.54.0 + CGO_ENABLED: 0 + + steps: + + # https://github.com/marketplace/actions/setup-go-environment + - name: Set up Go ${{ env.GO_VERSION }} + uses: actions/setup-go@v2 + with: + go-version: ${{ env.GO_VERSION }} + + # https://github.com/marketplace/actions/checkout + - name: Check out code + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + # https://golangci-lint.run/usage/install#other-ci + - name: Install golangci-lint ${{ env.GOLANGCI_LINT_VERSION }} + run: | + curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin ${GOLANGCI_LINT_VERSION} + golangci-lint --version + + - name: Install Pebble and challtestsrv + run: GO111MODULE=off go get -u github.com/letsencrypt/pebble/... + + - name: Set up a Memcached server + uses: niden/actions-memcached@v7 + + - name: Setup /etc/hosts + run: | + echo "127.0.0.1 acme.wtf" | sudo tee -a /etc/hosts + echo "127.0.0.1 lego.wtf" | sudo tee -a /etc/hosts + echo "127.0.0.1 acme.lego.wtf" | sudo tee -a /etc/hosts + echo "127.0.0.1 légô.wtf" | sudo tee -a /etc/hosts + echo "127.0.0.1 xn--lg-bja9b.wtf" | sudo tee -a /etc/hosts + + - name: Make + run: | + make + make clean + + - name: Install Hugo + run: | + wget -O /tmp/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_${HUGO_VERSION}_Linux-64bit.deb + sudo dpkg -i /tmp/hugo.deb + + - name: Build Documentation + run: make docs-build + + # https://github.com/marketplace/actions/github-pages + - name: Deploy to GitHub Pages + uses: crazy-max/ghaction-github-pages@v2 + with: + target_branch: gh-pages + build_dir: docs/public + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/go-cross.yml b/.github/workflows/go-cross.yml index 17b45eaf..5b0cfaec 100644 --- a/.github/workflows/go-cross.yml +++ b/.github/workflows/go-cross.yml @@ -16,7 +16,7 @@ jobs: strategy: matrix: - go-version: [ 1.16, 1.17, 1.x ] + go-version: [ 1.17, 1.18, 1.x ] os: [ubuntu-latest, macos-latest, windows-latest] steps: diff --git a/.github/workflows/main.yml b/.github/workflows/pr.yml similarity index 59% rename from .github/workflows/main.yml rename to .github/workflows/pr.yml index 1bb83460..fca0f497 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/pr.yml @@ -4,8 +4,6 @@ on: push: branches: - master - tags: - - v* pull_request: jobs: @@ -14,10 +12,9 @@ jobs: name: Main Process runs-on: ubuntu-latest env: - GO_VERSION: 1.17 - GOLANGCI_LINT_VERSION: v1.44.0 + GO_VERSION: 1.18 + GOLANGCI_LINT_VERSION: v1.45.2 HUGO_VERSION: 0.54.0 - SEIHON_VERSION: v0.8.3 CGO_ENABLED: 0 LEGO_E2E_TESTS: CI MEMCACHED_HOSTS: localhost:11211 @@ -51,9 +48,6 @@ jobs: git diff --exit-code go.mod git diff --exit-code go.sum - - name: Documentation validation - run: make validate-doc - # https://golangci-lint.run/usage/install#other-ci - name: Install golangci-lint ${{ env.GOLANGCI_LINT_VERSION }} run: | @@ -86,41 +80,3 @@ jobs: - name: Build Documentation run: make docs-build - - # https://github.com/marketplace/actions/github-pages - - name: Deploy to GitHub Pages - uses: crazy-max/ghaction-github-pages@v2 - if: github.event_name == 'push' - with: - target_branch: gh-pages - build_dir: docs/public - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - # https://goreleaser.com/ci/actions/ - - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v2 - if: startsWith(github.ref, 'refs/tags/v') - with: - version: latest - args: release --rm-dist --timeout=60m - env: - GITHUB_TOKEN: ${{ secrets.GH_TOKEN_REPO }} - - # Install Docker image multi-arch builder - - name: Install Seihon ${{ env.SEIHON_VERSION }} - if: startsWith(github.ref, 'refs/tags/v') - run: | - curl -sSfL https://raw.githubusercontent.com/ldez/seihon/master/godownloader.sh | sh -s -- -b $(go env GOPATH)/bin ${SEIHON_VERSION} - seihon --version - - - name: Docker Login - if: startsWith(github.ref, 'refs/tags/v') - env: - DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} - DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} - run: echo "${DOCKER_PASSWORD}" | docker login --username "${DOCKER_USERNAME}" --password-stdin - - - name: Publish Docker Images (Seihon) - if: startsWith(github.ref, 'refs/tags/v') - run: make publish-images diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..4b545963 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,60 @@ +name: Release + +on: + push: + tags: + - v* + +jobs: + + release: + name: Release version + runs-on: ubuntu-latest + env: + GO_VERSION: 1.18 + SEIHON_VERSION: v0.8.3 + CGO_ENABLED: 0 + + steps: + - name: Set up Go ${{ env.GO_VERSION }} + uses: actions/setup-go@v2 + with: + go-version: ${{ env.GO_VERSION }} + + - name: Check out code + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Cache Go modules + uses: actions/cache@v2 + with: + path: ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- + + # https://goreleaser.com/ci/actions/ + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v2 + with: + version: latest + args: release --rm-dist --timeout=60m + env: + GITHUB_TOKEN: ${{ secrets.GH_TOKEN_REPO }} + + # Install Docker image multi-arch builder + - name: Install Seihon ${{ env.SEIHON_VERSION }} + if: startsWith(github.ref, 'refs/tags/v') + run: | + curl -sSfL https://raw.githubusercontent.com/ldez/seihon/master/godownloader.sh | sh -s -- -b $(go env GOPATH)/bin ${SEIHON_VERSION} + seihon --version + + - name: Docker Login + env: + DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} + DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} + run: echo "${DOCKER_PASSWORD}" | docker login --username "${DOCKER_USERNAME}" --password-stdin + + - name: Publish Docker Images (Seihon) + run: make publish-images diff --git a/go.mod b/go.mod index a4a19dd7..7b99474a 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/go-acme/lego/v4 -go 1.16 +go 1.17 // github.com/exoscale/egoscale v1.19.0 => It is an error, please don't use it. // github.com/linode/linodego v1.0.0 => It is an error, please don't use it. @@ -65,3 +65,62 @@ require ( gopkg.in/yaml.v2 v2.4.0 software.sslmate.com/src/go-pkcs12 v0.0.0-20210415151418-c5206de65a78 ) + +require ( + github.com/Azure/go-autorest v14.2.0+incompatible // indirect + github.com/Azure/go-autorest/autorest/adal v0.9.13 // indirect + github.com/Azure/go-autorest/autorest/azure/cli v0.4.2 // indirect + github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect + github.com/Azure/go-autorest/logger v0.2.1 // indirect + github.com/Azure/go-autorest/tracing v0.6.0 // indirect + github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc // indirect + github.com/cpuguy83/go-md2man/v2 v2.0.0 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/deepmap/oapi-codegen v1.6.1 // indirect + github.com/dimchansky/utfbom v1.1.1 // indirect + github.com/fatih/structs v1.1.0 // indirect + github.com/form3tech-oss/jwt-go v3.2.2+incompatible // indirect + github.com/go-errors/errors v1.0.1 // indirect + github.com/go-resty/resty/v2 v2.1.1-0.20191201195748-d7b97669fe48 // indirect + github.com/gofrs/uuid v3.2.0+incompatible // indirect + github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect + github.com/golang/protobuf v1.5.2 // indirect + github.com/google/uuid v1.1.1 // indirect + github.com/googleapis/gax-go/v2 v2.0.5 // indirect + github.com/hashicorp/go-cleanhttp v0.5.1 // indirect + github.com/hashicorp/go-retryablehttp v0.7.0 // indirect + github.com/jarcoal/httpmock v1.0.6 // indirect + github.com/jmespath/go-jmespath v0.4.0 // indirect + github.com/json-iterator/go v1.1.7 // indirect + github.com/k0kubun/go-ansi v0.0.0-20180517002512-3bf9e2903213 // indirect + github.com/kolo/xmlrpc v0.0.0-20200310150728-e0350524596b // indirect + github.com/labbsr0x/goh v1.0.1 // indirect + github.com/liquidweb/go-lwApi v0.0.5 // indirect + github.com/liquidweb/liquidweb-cli v0.6.9 // indirect + github.com/mattn/go-isatty v0.0.12 // indirect + github.com/mitchellh/go-homedir v1.1.0 // indirect + github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect + github.com/modern-go/reflect2 v1.0.1 // indirect + github.com/onsi/ginkgo v1.16.4 // indirect + github.com/patrickmn/go-cache v2.1.0+incompatible // indirect + github.com/pkg/errors v0.9.1 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/russross/blackfriday/v2 v2.0.1 // indirect + github.com/shurcooL/sanitized_anchor_name v1.0.0 // indirect + github.com/sirupsen/logrus v1.4.2 // indirect + github.com/smartystreets/assertions v1.0.1 // indirect + github.com/smartystreets/go-aws-auth v0.0.0-20180515143844-0c1422d1fdb9 // indirect + github.com/softlayer/xmlrpc v0.0.0-20200409220501-5f089df7cb7e // indirect + github.com/spf13/cast v1.3.1 // indirect + github.com/stretchr/objx v0.3.0 // indirect + go.opencensus.io v0.22.3 // indirect + go.uber.org/ratelimit v0.0.0-20180316092928-c15da0234277 // indirect + golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1 // indirect + golang.org/x/text v0.3.6 // indirect + google.golang.org/appengine v1.6.5 // indirect + google.golang.org/genproto v0.0.0-20200305110556-506484158171 // indirect + google.golang.org/grpc v1.27.1 // indirect + google.golang.org/protobuf v1.26.0 // indirect + gopkg.in/ini.v1 v1.62.0 // indirect + gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect +)