From f4502fc82491ecc732f3cc641317ececb486b1d4 Mon Sep 17 00:00:00 2001 From: Alex Goodman Date: Fri, 25 Sep 2020 16:58:56 -0400 Subject: [PATCH] Add notifications around the release process (#184) * add pipeline notification upon release Signed-off-by: Alex Goodman * add pending notification to release pipeline Signed-off-by: Alex Goodman --- .github/workflows/release.yaml | 9 +++++++++ Makefile | 22 ++++++++++++++++++---- 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 9383b40b1..ab4c70d94 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -123,6 +123,15 @@ jobs: AWS_ACCESS_KEY_ID: ${{ secrets.TOOLBOX_AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.TOOLBOX_AWS_SECRET_ACCESS_KEY }} + - uses: 8398a7/action-slack@v3 + with: + status: ${{ job.status }} + fields: repo,workflow,action,eventName + text: "A new Syft release is ready to be (manually) published from the GitHub Releases page" + env: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_TOOLBOX_WEBHOOK_URL }} + if: ${{ success() }} + - uses: actions/upload-artifact@v2 with: name: artifacts diff --git a/Makefile b/Makefile index 5278387ac..f299d3bf1 100644 --- a/Makefile +++ b/Makefile @@ -226,9 +226,8 @@ acceptance-test-rpm-package-install: $(SNAPSHOTDIR) $(ACC_TEST_IMAGE) \ $(RESULTSDIR) -.PHONY: changlog -changelog: - mkdir -p $(DISTDIR) +.PHONY: changlog-release +changelog-release: @docker run -it --rm \ -v "$(shell pwd)":/usr/local/src/your-app ferrarimarco/github-changelog-generator \ --user anchore \ @@ -239,8 +238,23 @@ changelog: --unreleased-only \ --future-release $(VERSION) +.PHONY: changelog-unreleased +changelog-unreleased: ## show the current changelog that will be produced on the next release (note: requires GITHUB_TOKEN set) + @docker run -it --rm \ + -v "$(shell pwd)":/usr/local/src/your-app ferrarimarco/github-changelog-generator \ + --user anchore \ + --project $(BIN) \ + -t ${GITHUB_TOKEN} \ + --unreleased-only + @printf '\n$(BOLD)$(CYAN)Unreleased Changes (closed PRs and issues will not be in the final changelog)$(RESET)\n' + @docker run -it --rm \ + -v $(shell pwd)/CHANGELOG.md:/CHANGELOG.md \ + rawkode/mdv \ + -t 785.3229 \ + /CHANGELOG.md + .PHONY: release -release: clean-dist changelog ## Build and publish final binaries and packages +release: clean-dist changelog-release ## 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