diff --git a/.circleci/real_config.yml b/.circleci/real_config.yml index a5c92919fee..ee3f2b1bce4 100644 --- a/.circleci/real_config.yml +++ b/.circleci/real_config.yml @@ -1910,6 +1910,20 @@ jobs: command: make -C agent release-ee - run: mkdir /tmp/pkgs && cp -v */dist/*.{rpm,deb,tar.gz} /tmp/pkgs + publish-helm-gh-rc: + docker: + - image: <> + environment: + GO111MODULE: "on" + steps: + - checkout + - attach_workspace: + at: . + - reinstall-go + - make-component: + component: helm + target: release-gh-rc + publish-helm-gh: parameters: ee: @@ -5576,6 +5590,12 @@ workflows: context: determined-production filters: *release-filters + - publish-helm-gh-rc: + requires: + - build-helm + context: determined-production + filters: *rc-filters + - upload-try-now-template: context: determined-production filters: *release-filters diff --git a/helm/Makefile b/helm/Makefile index 8e2f5657bab..87b97a8f44f 100644 --- a/helm/Makefile +++ b/helm/Makefile @@ -26,6 +26,18 @@ release-gh: git clean -df goreleaser --rm-dist +.PHONY: release-gh-rc +release-gh-rc: export GORELEASER_CURRENT_TAG := $(VERSION_TAG) +# The following line lists all tags by creation date, finds the current tag and +# the next line after, then prints that second line, which should be the most +# recent previous tag. This works if the previous tag is both a minor release, +# or an rc release. +release-gh-rc: export GORELEASER_PREVIOUS_TAG := $(shell git tag --sort=-creatordate | grep "$(VERSION_TAG)" -A1 | sed -n '2 p') +release-gh-rc: + go install github.com/goreleaser/goreleaser@v1.14.1 + git clean -df + goreleaser --rm-dist + .PHONY: release-gh-dryrun release-gh-dryrun: export GORELEASER_CURRENT_TAG := $(VERSION_TAG) release-gh-dryrun: export GORELEASER_PREVIOUS_TAG := $(shell git tag --sort=-creatordate | grep -E '^[0-9.]+$$' | grep "$(VERSION_TAG)" -A1 | sed -n '2 p')