From df98bc569630924bddd14eacd8dec21b0aca4c5b Mon Sep 17 00:00:00 2001 From: Ignasi Barrera Date: Tue, 5 Mar 2024 20:29:02 +0100 Subject: [PATCH] Compress the binaries for smaller release artifacts (#76) --- .github/workflows/publish.yaml | 3 ++- Makefile | 8 +++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index dcb4fd6..6f02c80 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -52,10 +52,11 @@ jobs: - run: make fips - run: make docker-push - run: make docker-push-fips + - run: make dist - uses: softprops/action-gh-release@v1 if: startsWith(github.ref, 'refs/tags/') with: - files: bin/authservice-* + files: bin/dist/* draft: true generate_release_notes: true diff --git a/Makefile b/Makefile index 7150ea4..bdc4585 100644 --- a/Makefile +++ b/Makefile @@ -64,7 +64,6 @@ else @$(ROOT)/run-in-docker.sh $(GOOS)/$(GOARCH) make $@ endif - .PHONY: clean clean: clean/e2e ## Clean the build artifacts @rm -rf $(OUTDIR) @@ -216,6 +215,13 @@ check: ## CI blocks merge until this passes. If this fails, run "make check" lo exit 1; \ fi +.PHONY: dist +dist: ## Package the release binaries + @mkdir -p $(OUTDIR)/dist + @cd $(OUTDIR) && for f in $(NAME)-*; do \ + tar cvzf dist/$$f.tar.gz $$f; \ + done + .PHONY: help help: ## Display this help @awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m\033[0m\n"} \