diff --git a/.gitignore b/.gitignore index cfa6b4053..157a35422 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +CHANGELOG.md /dist /snapshot .server/ diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 765dae80a..f5a971401 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -1,9 +1,11 @@ release: - # If set to auto, will mark the release as not ready for production - # in case there is an indicator for this in the tag e.g. v1.0.0-rc1 - # If set to true, will mark the release as not ready for production. + # If set to auto, will mark the release as not ready for production in case there is an indicator for this in the + # tag e.g. v1.0.0-rc1 .If set to true, will mark the release as not ready for production. prerelease: false + # If set to true, will not auto-publish the release. This is done to allow us to review the changelog before publishing. + draft: true + signs: - artifacts: checksum args: ["--output", "${signature}", "--detach-sign", "${artifact}"] diff --git a/Makefile b/Makefile index 076c50b43..11be5d1e2 100644 --- a/Makefile +++ b/Makefile @@ -222,8 +222,21 @@ acceptance-test-rpm-package-install: $(SNAPSHOTDIR) $(ACC_TEST_IMAGE) \ $(RESULTSDIR) +.PHONY: changlog +changelog: + mkdir -p $(DISTDIR) + @docker run -it --rm \ + -v "$(shell pwd)":/usr/local/src/your-app ferrarimarco/github-changelog-generator \ + --user anchore \ + --project $(BIN) \ + -t ${GITHUB_TOKEN} \ + --no-pr-wo-labels \ + --no-issues-wo-labels \ + --unreleased-only \ + --future-release $(VERSION) + .PHONY: release -release: clean-dist ## Build and publish final binaries and packages +release: clean-dist changelog ## Build and publish final binaries and packages $(call title,Publishing release artifacts) # create a config with the dist dir overridden echo "dist: $(DISTDIR)" > $(TEMPDIR)/goreleaser.yaml @@ -231,7 +244,10 @@ release: clean-dist ## Build and publish final binaries and packages # release BUILD_GIT_TREE_STATE=$(GITTREESTATE) \ - $(TEMPDIR)/goreleaser --rm-dist --config $(TEMPDIR)/goreleaser.yaml + $(TEMPDIR)/goreleaser \ + --rm-dist \ + --config $(TEMPDIR)/goreleaser.yaml \ + --release-notes <(cat CHANGELOG.md) # verify checksum signatures .github/scripts/verify-signature.sh "$(DISTDIR)"